From 7e3be900daaae1586ac4a53192dfc7bcc18da34e Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 10 Apr 2021 14:09:59 +0200 Subject: Use custom variables in Makefiles. Fixes #10. --- lib/Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/Makefile') diff --git a/lib/Makefile b/lib/Makefile index ff4ddd5..10a06a1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,21 +1,20 @@ CC ?= gcc -CFLAGS = -Wall DEBUG ?= 0 TEST ?= 0 FAST ?= 0 ifeq ($(DEBUG), 1) - CFLAGS += -DDEBUG -g -Og -Werror -pedantic + ECGEN_CFLAGS = -DDEBUG -g -Og -Werror -pedantic else ifeq ($(TEST), 1) - CFLAGS += -DNDEBUG --coverage -g -O0 + ECGEN_CFLAGS = -DNDEBUG --coverage -g -O0 else ifeq ($(FAST), 1) ifeq ($(CC), gcc) - CFLAGS += -DNDEBUG -O3 -march=native -pipe + ECGEN_CFLAGS = -DNDEBUG -O3 -march=native -pipe else - CFLAGS += -DNDEBUG -O3 + ECGEN_CFLAGS = -DNDEBUG -O3 endif else - CFLAGS += -DNDEBUG -O2 + ECGEN_CFLAGS = -DNDEBUG -O2 endif export @@ -25,4 +24,4 @@ all: clean: $(MAKE) -C parson clean - $(MAKE) -C sha1 clean \ No newline at end of file + $(MAKE) -C sha1 clean -- cgit v1.2.3-70-g09d2