mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-13 22:37:27 -04:00
Makefile: use -Wno-pedantic-ms-format for MinGW builds
This commit is contained in:
parent
021e692a7b
commit
eaa2247dfa
37
Makefile
37
Makefile
@ -13,6 +13,24 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
#### 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.
|
||||
|
||||
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 := \
|
||||
$(CFLAGS) -O2 -fomit-frame-pointer -std=c99 -I. -Icommon \
|
||||
-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)
|
||||
|
||||
##############################################################################
|
||||
|
||||
STATIC_LIB_SUFFIX := .a
|
||||
SHARED_LIB_SUFFIX := .so
|
||||
PROG_SUFFIX :=
|
||||
@ -31,28 +49,11 @@ ifneq ($(findstring -mingw,$(CC)),)
|
||||
PROG_CFLAGS := -static -municode
|
||||
PIC_REQUIRED :=
|
||||
HARD_LINKS :=
|
||||
override CFLAGS := $(CFLAGS) $(call cc-option,-Wno-pedantic-ms-format)
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
|
||||
#### 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.
|
||||
|
||||
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 := \
|
||||
$(CFLAGS) -O2 -fomit-frame-pointer -std=c99 -I. -Icommon \
|
||||
-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)
|
||||
|
||||
##############################################################################
|
||||
|
||||
#### Quiet make is enabled by default. Define V=1 to disable.
|
||||
|
||||
ifneq ($(findstring s,$(MAKEFLAGS)),s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user