diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-09-10 16:12:07 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-09-10 16:12:07 -0700 |
commit | f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1 (patch) | |
tree | d9b013ab252968ec1e90e721f7b2ab819af0acb0 /make.defs | |
parent | 5939e1bec75f2550d3ce109b9cd9a5d22c0626c2 (diff) | |
parent | 723fb5d3431b847526c433a13aa74485cfb564a3 (diff) | |
download | tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.gz tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.bz2 tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.tar.xz tmwa-f841b6fdcc802e73d52da0e67ee192c0c2c1c7e1.zip |
Merge commit '723fb5d3431b847526c433a13aa74485cfb564a3'
Diffstat (limited to 'make.defs')
-rw-r--r-- | make.defs | 38 |
1 files changed, 15 insertions, 23 deletions
@@ -1,28 +1,20 @@ -# Definitions for our funky-chicken build system +# defaults +CC = gcc +CFLAGS = -pipe -g -fno-strict-aliasing -Wall -Wextra -Werror=all -Werror=implicit-function-declaration +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 - -PLATFORM = $(shell uname) -ifeq ($(findstring FreeBSD,$(PLATFORM)), FreeBSD) -MAKE = gmake -else -MAKE = make -endif - -OPT = -pipe -g -fno-strict-aliasing -O2 -Wall +# works on both x86 and x86_64 +override CC += -m32 -std=gnu99 -ifeq ($(findstring CYGWIN,$(PLATFORM)), CYGWIN) -OS_TYPE = -DCYGWIN -CFLAGS = $(OPT) -DFD_SETSIZE=4096 -I../common $(PACKETDEF) $(OS_TYPE) +ifeq ($(findstring CYGWIN,$(shell uname)), CYGWIN) + override CFLAGS += -DFD_SETSIZE=4096 -DCYGWIN else -OS_TYPE = -CFLAGS = $(OPT) -fstack-protector -Wno-pointer-sign -I../common $(PACKETDEF) $(OS_TYPE) + override CFLAGS += -fstack-protector endif +# The default recipe is suboptimal +%.c: %.l + $(LEX) -o $@ $< -MKDEF = CC="$(CC)" CFLAGS="$(CFLAGS)" |