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