mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-18 08:49:39 -04:00
Makefile: allow disabling compiler warnings
Move the user-specified CFLAGS to the end of the CFLAGS definition, so that warnings the Makefile enables can be disabled using -Wno-$foo. This is useful when old compilers give false positive warnings.
This commit is contained in:
parent
ef936b6521
commit
303bb42c52
6
Makefile
6
Makefile
@ -45,14 +45,14 @@ cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null \
|
||||
1>&2 2>/dev/null; then echo $(1); fi)
|
||||
|
||||
override CFLAGS := \
|
||||
-O2 -fomit-frame-pointer $(CFLAGS) -std=c99 -I. \
|
||||
-Wall -Wundef \
|
||||
-O2 -fomit-frame-pointer -std=c99 -I. -Wall -Wundef \
|
||||
$(call cc-option,-Wpedantic) \
|
||||
$(call cc-option,-Wdeclaration-after-statement) \
|
||||
$(call cc-option,-Wmissing-prototypes) \
|
||||
$(call cc-option,-Wstrict-prototypes) \
|
||||
$(call cc-option,-Wvla) \
|
||||
$(call cc-option,-Wimplicit-fallthrough)
|
||||
$(call cc-option,-Wimplicit-fallthrough) \
|
||||
$(CFLAGS)
|
||||
|
||||
FREESTANDING :=
|
||||
ifdef FREESTANDING
|
||||
|
Loading…
x
Reference in New Issue
Block a user