better cflags representation in makefile

This commit is contained in:
Mylloon 2023-05-03 15:34:32 +02:00
parent 52201d5382
commit 1a6f76c11f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -21,7 +21,8 @@ GREP = grep
AWK = awk AWK = awk
# Déclaration des options du compilateur # Déclaration des options du compilateur
CFLAGS = -Wall -O3 COPTI = -O3
CFLAGS = -Wall $(COPTI) -std=c17
CPPFLAGS = -I. CPPFLAGS = -I.
LDFLAGS = -lm LDFLAGS = -lm
@ -69,10 +70,10 @@ all: $(PROGNAME)
$(PROGNAME): $(OBJ) $(PROGNAME): $(OBJ)
$(CC) $(OBJ) $(LDFLAGS) -o $(PROGNAME) $(CC) $(OBJ) $(LDFLAGS) -o $(PROGNAME)
debug: CFLAGS = -Wall -Wextra -Wconversion -Wno-sign-conversion -Wno-unused-parameter \ debug: CFLAGS := $(filter-out $(COPTI),$(CFLAGS)) -Wextra -Wconversion -g3 -Og \
-Wno-unused-function -Wdouble-promotion -Wshadow -Wcast-align \ -Wno-sign-conversion -Wno-unused-parameter -Wno-unused-function \
-Wstrict-prototypes -fanalyzer -fsanitize=undefined \ -Wdouble-promotion -Wshadow -Wcast-align -Wstrict-prototypes \
-fsanitize-undefined-trap-on-error -g3 -fanalyzer -fsanitize=undefined -fsanitize-undefined-trap-on-error
debug: $(PROGNAME) debug: $(PROGNAME)
%.o: %.c %.o: %.c