better cflags representation in makefile
This commit is contained in:
parent
52201d5382
commit
1a6f76c11f
1 changed files with 6 additions and 5 deletions
11
Makefile
11
Makefile
|
@ -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
|
||||||
|
|
Reference in a new issue