mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-10 12:58:30 -04:00
Compatibility with older versions of GCC
This commit is contained in:
parent
6bcfb00c54
commit
d39f4505a1
17
Makefile
17
Makefile
@ -35,11 +35,20 @@ endif
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
#### Common compiler flags; not intended to be overridden
|
#### Common compiler flags.
|
||||||
|
#### Flags given here are not intended to be overridden, but you can add more
|
||||||
|
#### by defining CFLAGS in the environment or on the 'make' command line.
|
||||||
|
|
||||||
override CFLAGS += -O2 -fomit-frame-pointer -std=c99 -I. -Icommon \
|
override CFLAGS := \
|
||||||
-Wall -Wpedantic -Wundef -Wdeclaration-after-statement \
|
$(CFLAGS) -O2 -fomit-frame-pointer -std=c99 -I. -Icommon \
|
||||||
-Wmissing-prototypes -Wstrict-prototypes
|
-Wall -Wundef \
|
||||||
|
$(call cc-option,-Wpedantic) \
|
||||||
|
$(call cc-option,-Wdeclaration-after-statement) \
|
||||||
|
$(call cc-option,-Wmissing-prototypes) \
|
||||||
|
$(call cc-option,-Wstrict-prototypes)
|
||||||
|
|
||||||
|
cc-option = $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null \
|
||||||
|
1>&2 2>/dev/null; then echo $(1); fi)
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user