2005-07-27 16:58:18 +00:00
|
|
|
#(C)2004-2005 AMX Mod X Development Team
|
|
|
|
# Makefile written by David "BAILOPAN" Anderson
|
|
|
|
|
|
|
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
|
|
|
|
2006-08-27 02:34:03 +00:00
|
|
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing
|
2005-07-27 16:58:18 +00:00
|
|
|
DEBUG_FLAGS = -g -ggdb3
|
2006-08-25 00:28:36 +00:00
|
|
|
CPP = gcc-4.1
|
2005-07-27 16:58:18 +00:00
|
|
|
BINARY = amxxpc
|
|
|
|
|
2005-08-02 18:37:59 +00:00
|
|
|
OBJECTS = amx.cpp amxxpc.cpp Binary.cpp
|
2005-07-27 16:58:18 +00:00
|
|
|
|
2005-08-18 07:01:47 +00:00
|
|
|
LINK = -lz /lib/libstdc++.a
|
2005-07-27 16:58:18 +00:00
|
|
|
|
|
|
|
INCLUDE = -I. -L.
|
|
|
|
|
|
|
|
ifeq "$(DEBUG)" "true"
|
|
|
|
BIN_DIR = Debug
|
|
|
|
CFLAGS = $(DEBUG_FLAGS)
|
|
|
|
else
|
|
|
|
BIN_DIR = Release
|
|
|
|
CFLAGS = $(OPT_FLAGS)
|
|
|
|
endif
|
|
|
|
|
2005-08-18 07:01:47 +00:00
|
|
|
CFLAGS += -DLINUX -DNDEBUG -Wno-deprecated -fexceptions -DHAVE_STDINT_H -DAMX_ANSIONLY -fno-rtti -static-libgcc
|
2005-07-27 16:58:18 +00:00
|
|
|
|
|
|
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
|
|
|
|
|
|
|
$(BIN_DIR)/%.o: %.cpp
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
all:
|
|
|
|
mkdir -p $(BIN_DIR)
|
|
|
|
$(MAKE) amxxpc
|
|
|
|
|
|
|
|
amxxpc: $(OBJ_LINUX)
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf Release/*.o
|
|
|
|
rm -rf Release/$(BINARY)
|
|
|
|
rm -rf Debug/*.o
|
|
|
|
rm -rf Debug/$(BINARY)
|
|
|
|
|