From 6c39b326d574ed52d7e76a9e21ebac3eba7507c8 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sun, 22 Aug 2021 20:00:54 +0000 Subject: [PATCH] Update template --- template/Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/template/Makefile b/template/Makefile index 65daddd..dc76c4e 100644 --- a/template/Makefile +++ b/template/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}