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
|
include sources.mk
|
||||||
|
|
||||||
ifeq (${CC},clang)
|
ifeq (${CC},clang)
|
||||||
|
|
||||||
CFLAGS =\
|
CFLAGS =\
|
||||||
-std=c99\
|
-std=c99\
|
||||||
-Weverything\
|
-Weverything\
|
||||||
-Wno-padded\
|
-Wno-padded\
|
||||||
-Wno-disabled-macro-expansion\
|
-Wno-disabled-macro-expansion\
|
||||||
-pedantic
|
-pedantic
|
||||||
|
|
||||||
|
ifeq (${DEBUG},1)
|
||||||
|
CFLAGS += -g
|
||||||
|
else
|
||||||
|
CFLAGS += -O2 -Werror
|
||||||
|
endif
|
||||||
|
|
||||||
else ifeq (${CC},gcc)
|
else ifeq (${CC},gcc)
|
||||||
|
|
||||||
CFLAGS =\
|
CFLAGS =\
|
||||||
-std=c99\
|
-std=c99\
|
||||||
-Wall\
|
-Wall\
|
||||||
@ -27,14 +36,16 @@ CFLAGS =\
|
|||||||
-Wunsafe-loop-optimizations\
|
-Wunsafe-loop-optimizations\
|
||||||
-Wparentheses\
|
-Wparentheses\
|
||||||
-pedantic
|
-pedantic
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (${DEBUG},1)
|
ifeq (${DEBUG},1)
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
else
|
else
|
||||||
CFLAGS += -O2
|
CFLAGS += -O2 -Werror
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
CFLAGS += ${EXTRA_CFLAGS}
|
||||||
|
|
||||||
OBJ = ${SRC:.c=.o}
|
OBJ = ${SRC:.c=.o}
|
||||||
|
|
||||||
all: ${OBJ}
|
all: ${OBJ}
|
||||||
|
Reference in New Issue
Block a user