summaryrefslogtreecommitdiff
path: root/make.defs
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2010-05-05 07:34:05 -0400
committerMadCamel <madcamel@gmail.com>2010-05-05 07:34:05 -0400
commit51e87379c9d532cafc98b96178709b8b8c88e1ae (patch)
treedb80f2e1a758b2739ab79218a88a3def501f362d /make.defs
parentae73f3122063048b3a5a2d1c48f6c13b02fd4e1f (diff)
downloadtmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.gz
tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.bz2
tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.tar.xz
tmwa-51e87379c9d532cafc98b96178709b8b8c88e1ae.zip
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.
Diffstat (limited to 'make.defs')
-rw-r--r--make.defs28
1 files changed, 28 insertions, 0 deletions
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)"