summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate.tmw@googlemail.com>2008-11-07 18:08:11 +0000
committerFate <fate.tmw@googlemail.com>2008-11-07 18:08:11 +0000
commit1b35a068600580dc70fdbc4232297b55c84d8868 (patch)
tree4dd22f2d5f9c9b36ee8ffb01125055ad578f37d2
parent4294721c3462615d456bf2bd3ccf015d40cac3e0 (diff)
downloadtmwa-1b35a068600580dc70fdbc4232297b55c84d8868.tar.gz
tmwa-1b35a068600580dc70fdbc4232297b55c84d8868.tar.bz2
tmwa-1b35a068600580dc70fdbc4232297b55c84d8868.tar.xz
tmwa-1b35a068600580dc70fdbc4232297b55c84d8868.zip
* Auto-detect amd64, add -m32 flag to gcc options in that case
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d9793b7..469d7d1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,10 @@
# $Id$
-CC = gcc -pipe
+ifeq ($(shell uname -m), x86_64)
+M32=-m32
+endif
+
+CC = gcc ${M32} -pipe
PACKETDEF = -DPACKETVER=5 -DNEW_006b
#PACKETDEF = -DPACKETVER=4 -DNEW_006b
#PACKETDEF = -DPACKETVER=3 -DNEW_006b
@@ -15,7 +19,7 @@ else
MAKE = make
endif
-OPT = -g -O2
+OPT = -g -O2 ${M32}
ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN)
OS_TYPE = -DCYGWIN