From e49bce26d3de1a5c2afbe018a869ff8790294fc5 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 16 Mar 2011 00:38:02 -0700 Subject: Use makefiles correctly and expand include dirs --- make.defs | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'make.defs') diff --git a/make.defs b/make.defs index b9bc3fb..55710c4 100644 --- a/make.defs +++ b/make.defs @@ -1,28 +1,16 @@ -# Definitions for our funky-chicken build system +# defaults +CC = gcc +CFLAGS = -pipe -g -fno-strict-aliasing -O2 -Wall +CP = cp -f +# The below might cause problems sometimes +# CP = cp -lf +# CP = cp -sf -ifeq ($(shell uname -m), x86_64) -M32=-m32 -endif - -CC = gcc ${M32} -LEX=flex -BISON=bison +# works on both x86 and x86_64 +override CC += -m32 -PLATFORM = $(shell uname) -ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) -MAKE = gmake +ifeq ($(findstring CYGWIN,$(shell uname)), CYGWIN) + override CFLAGS += -DFD_SETSIZE=4096 -DCYGWIN else -MAKE = make + override CFLAGS += -fstack-protector -Wno-pointer-sign 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-70-g09d2