CFLAGS += -Wbad-function-cast
CFLAGS += -fno-strict-aliasing
-ifeq ($(uname_s),Linux)
- CFLAGS += -fdata-sections -ffunction-sections
- CFLAGS += -Wstrict-prototypes
- CFLAGS += -Wshadow
- # causes warnings on *BSD for the feature test macros
- CFLAGS += -Wunused-macros
- LDFLAGS += -Wl,--gc-sections
-endif
-
STRICT_CFLAGS = $(CFLAGS)
-STRICT_CFLAGS += -g -Wunused -Wundef -W
+STRICT_CFLAGS += -g -Wundef -W
STRICT_CFLAGS += -Wredundant-decls
-STRICT_CFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas
+STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas
STRICT_CFLAGS += -Wformat-security
STRICT_CFLAGS += -Wmissing-format-attribute
LDFLAGS += $(clock_gettime_ldflags)
+ifeq ($(uname_s),Linux)
+ # these cause warnings on *BSD
+ STRICT_CFLAGS += -fdata-sections -ffunction-sections
+ STRICT_CFLAGS += -Wstrict-prototypes
+ STRICT_CFLAGS += -Wshadow
+ STRICT_CFLAGS += -Wunused -Wall
+ LDFLAGS += -Wl,--gc-sections
+endif
+
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
ifeq ("$(origin V)", "command line")