summaryrefslogtreecommitdiff
path: root/make.defs
blob: 6f648e371aa85f16033fdefcc4100c77183a93bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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

# works on both x86 and x86_64
override CC += -m32 -std=gnu99

ifeq ($(findstring CYGWIN,$(shell uname)), CYGWIN)
  override CFLAGS += -DFD_SETSIZE=4096 -DCYGWIN
else
  override CFLAGS += -fstack-protector
endif
# The default recipe is suboptimal
%.c: %.l
	$(LEX) -o $@ $<