Error on non-debug build and add EXTRA_CFLAGS
This commit is contained in:
parent
dd649c2ffc
commit
0f7fbc5850
15
Makefile
15
Makefile
@ -2,13 +2,22 @@ include config.mk
|
||||
include sources.mk
|
||||
|
||||
ifeq (${CC},clang)
|
||||
|
||||
CFLAGS =\
|
||||
-std=c99\
|
||||
-Weverything\
|
||||
-Wno-padded\
|
||||
-Wno-disabled-macro-expansion\
|
||||
-pedantic
|
||||
|
||||
ifeq (${DEBUG},1)
|
||||
CFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O2 -Werror
|
||||
endif
|
||||
|
||||
else ifeq (${CC},gcc)
|
||||
|
||||
CFLAGS =\
|
||||
-std=c99\
|
||||
-Wall\
|
||||
@ -27,14 +36,16 @@ CFLAGS =\
|
||||
-Wunsafe-loop-optimizations\
|
||||
-Wparentheses\
|
||||
-pedantic
|
||||
endif
|
||||
|
||||
ifeq (${DEBUG},1)
|
||||
CFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O2
|
||||
CFLAGS += -O2 -Werror
|
||||
endif
|
||||
|
||||
endif
|
||||
CFLAGS += ${EXTRA_CFLAGS}
|
||||
|
||||
OBJ = ${SRC:.c=.o}
|
||||
|
||||
all: ${OBJ}
|
||||
|
Reference in New Issue
Block a user