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
|
||||
|
||||
# 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
|
||||
|
|
Reference in a new issue