amxmodx/compiler/libpc300/Makefile

47 lines
1023 B
Makefile
Raw Normal View History

2005-07-27 21:28:06 +04:00
#(C)2004-2005 AMX Mod X Development Team
# Makefile written by David "BAILOPAN" Anderson
### EDIT BELOW FOR OTHER PROJECTS ###
2006-08-25 04:28:36 +04:00
OPT_FLAGS = -O3 -funroll-loops -s -pipe -fno-strict-aliasing -fvisibility=hidden
2005-07-27 21:28:06 +04:00
DEBUG_FLAGS = -g -ggdb3
2006-08-25 04:28:36 +04:00
CPP = gcc-4.1
NAME = amxxpc32
2005-07-27 21:28:06 +04:00
OBJECTS = sc1.c sc2.c sc3.c sc4.c sc5.c sc6.c sc7.c scvars.c scmemfil.c \
2006-07-16 11:24:35 +04:00
scstate.c sclist.c sci18n.c scexpand.c pawncc.c libpawnc.c prefix.c \
memfile.c
2005-07-27 21:28:06 +04:00
LINK = -lpthread
INCLUDE = -I.
BINARY = $(NAME).so
BIN_DIR = Release
CFLAGS += -DPAWN_CELL_SIZE=32
2005-07-27 21:28:06 +04:00
CFLAGS += -DLINUX -DNDEBUG -DHAVE_STDINT_H -DENABLE_BINRELOC -DNO_MAIN -DPAWNC_DLL -static-libgcc
2005-07-27 21:28:06 +04:00
CFLAGS += $(OPT_FLAGS)
OBJ_LINUX := $(OBJECTS:%.c=$(BIN_DIR)/%.o)
$(BIN_DIR)/%.o: %.c
2008-08-17 00:13:12 +04:00
$(CPP) $(INCLUDE) $(CFLAGS) -m32 -o $@ -c $<
2005-07-27 21:28:06 +04:00
all:
mkdir -p Release
2005-07-27 21:28:06 +04:00
$(MAKE) pawn_make
pawn_make: $(OBJ_LINUX)
2008-08-17 00:13:12 +04:00
$(CPP) $(INCLUDE) $(CFLAGS) -m32 $(OBJ_LINUX) $(LINK) -shared -ldl -lm -o$(BIN_DIR)/$(BINARY)
2005-07-27 21:28:06 +04:00
debug:
$(MAKE) all DEBUG=true
default: all
clean:
rm -rf Release/*.o
rm -rf Release/$(BINARY)
2005-07-27 21:28:06 +04:00