Error on non-debug build and add EXTRA_CFLAGS

This commit is contained in:
Alex D. 2021-08-22 20:23:43 +00:00
parent dd649c2ffc
commit 0f7fbc5850
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
1 changed files with 13 additions and 2 deletions

View File

@ -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}