From 1b35a068600580dc70fdbc4232297b55c84d8868 Mon Sep 17 00:00:00 2001 From: Fate Date: Fri, 7 Nov 2008 18:08:11 +0000 Subject: * Auto-detect amd64, add -m32 flag to gcc options in that case --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2