From 51e87379c9d532cafc98b96178709b8b8c88e1ae Mon Sep 17 00:00:00 2001 From: MadCamel Date: Wed, 5 May 2010 07:34:05 -0400 Subject: Fixed up and slightly simplified the build system It's now possible to run 'make' in any of the src/ subdirs and have it build properly. Moved some tools including eathena-monitor to src/tools - run 'make tools' to build. CFLAGS, etc are now in the 'make.defs' file. Requires GNU make. --- make.defs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 make.defs (limited to 'make.defs') diff --git a/make.defs b/make.defs new file mode 100644 index 0000000..b9bc3fb --- /dev/null +++ b/make.defs @@ -0,0 +1,28 @@ +# Definitions for our funky-chicken build system + +ifeq ($(shell uname -m), x86_64) +M32=-m32 +endif + +CC = gcc ${M32} +LEX=flex +BISON=bison + +PLATFORM = $(shell uname) +ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) +MAKE = gmake +else +MAKE = make +endif + +OPT = -pipe -g -fno-strict-aliasing -O2 -Wall + +ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) +OS_TYPE = -DCYGWIN +CFLAGS = $(OPT) -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE) +else +OS_TYPE = +CFLAGS = $(OPT) -fstack-protector -Wno-pointer-sign -I../common $(PACKETDEF) $(OS_TYPE) +endif + +MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" -- cgit v1.2.3-60-g2f50