2005-07-27 17:28:06 +00:00
|
|
|
#(C)2004-2005 AMX Mod X Development Team
|
|
|
|
# Makefile written by David "BAILOPAN" Anderson
|
|
|
|
|
|
|
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
|
|
|
|
2005-08-18 07:01:47 +00:00
|
|
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
2005-07-27 17:28:06 +00:00
|
|
|
DEBUG_FLAGS = -g -ggdb3
|
|
|
|
CPP = gcc
|
|
|
|
NAME = amxxpc
|
|
|
|
|
|
|
|
OBJECTS = sc1.c sc2.c sc3.c sc4.c sc5.c sc6.c sc7.c scvars.c scmemfil.c \
|
2006-07-16 07:24:35 +00:00
|
|
|
scstate.c sclist.c sci18n.c scexpand.c pawncc.c libpawnc.c prefix.c \
|
|
|
|
memfile.c
|
2005-07-27 17:28:06 +00:00
|
|
|
|
|
|
|
LINK = -lpthread
|
|
|
|
|
|
|
|
INCLUDE = -I.
|
|
|
|
|
|
|
|
ifeq "$(PAWN64)" "true"
|
|
|
|
BINARY = $(NAME)64.so
|
|
|
|
BIN_DIR = Release64
|
2005-09-18 01:14:44 +00:00
|
|
|
CFLAGS += -DPAWN_CELL_SIZE=64 -DHAVE_I64 -Dpc_printf=pc_printf64
|
2005-07-27 17:28:06 +00:00
|
|
|
else
|
|
|
|
BINARY = $(NAME)32.so
|
|
|
|
BIN_DIR = Release32
|
|
|
|
CFLAGS += -DPAWN_CELL_SIZE=32
|
|
|
|
endif
|
|
|
|
|
2005-08-18 07:01:47 +00:00
|
|
|
CFLAGS += -DLINUX -DNDEBUG -fPIC -DHAVE_STDINT_H -DENABLE_BINRELOC -DNO_MAIN -DPAWNC_DLL -static-libgcc
|
2005-07-27 17:28:06 +00:00
|
|
|
|
|
|
|
CFLAGS += $(OPT_FLAGS)
|
|
|
|
OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o)
|
|
|
|
|
|
|
|
$(BIN_DIR)/%.o: %.c
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
all:
|
|
|
|
mkdir -p Release32
|
|
|
|
mkdir -p Release64
|
|
|
|
$(MAKE) pawn_make
|
|
|
|
$(MAKE) pawn_make PAWN64=true
|
|
|
|
|
|
|
|
pawn_make: $(OBJ_LINUX)
|
|
|
|
$(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
|
|
|
|
|
|
|
|
debug:
|
|
|
|
$(MAKE) all DEBUG=true
|
|
|
|
|
|
|
|
default: all
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf Release32/*.o
|
|
|
|
rm -rf Release32/$(BINARY)
|
|
|
|
rm -rf Release64/*.o
|
|
|
|
rm -rf Release64/$(BINARY)
|
|
|
|
|