X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile.real;h=7d4eff4fe2eaecc99fb83627a154b9c1672118ca;hb=HEAD;hp=bf3cb6e0ff0616f3618c778c11731651d9a4151c;hpb=68c0deb1ae25af923fde02952159c1129a281813;p=paraslash.git diff --git a/Makefile.real b/Makefile.real index bf3cb6e0..bd2bd9d9 100644 --- a/Makefile.real +++ b/Makefile.real @@ -21,7 +21,7 @@ uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h) -COPYRIGHT_YEAR := 2022 +COPYRIGHT_YEAR := 2024 ifeq ("$(origin O)", "command line") build_dir := $(O) @@ -119,6 +119,7 @@ CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -I$(lls_suite_dir) CPPFLAGS += -I$(yy_build_dir) CPPFLAGS += $(lopsub_cppflags) +CPPFLAGS += -Wunused-macros STRICT_CFLAGS += -fno-strict-aliasing STRICT_CFLAGS += -ftrapv @@ -133,6 +134,11 @@ STRICT_CFLAGS += -Wredundant-decls STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas STRICT_CFLAGS += -Wdeclaration-after-statement STRICT_CFLAGS += -Wformat -Wformat-security -Wmissing-format-attribute +STRICT_CFLAGS += -fdata-sections -ffunction-sections +STRICT_CFLAGS += -Wstrict-prototypes +STRICT_CFLAGS += -Wshadow + +LDFLAGS += -Wl,--gc-sections ifeq ($(ENABLE_UBSAN), yes) STRICT_CFLAGS += -fsanitize=undefined @@ -141,12 +147,7 @@ endif ifeq ($(uname_s),Linux) # these cause warnings on *BSD - CPPFLAGS += -Wunused-macros - STRICT_CFLAGS += -fdata-sections -ffunction-sections - STRICT_CFLAGS += -Wstrict-prototypes - STRICT_CFLAGS += -Wshadow STRICT_CFLAGS += -Wunused -Wall - LDFLAGS += -Wl,--gc-sections endif cc-option = $(shell \ @@ -156,6 +157,7 @@ cc-option = $(shell \ STRICT_CFLAGS += $(call cc-option, -Wformat-signedness) STRICT_CFLAGS += $(call cc-option, -Wdiscarded-qualifiers) +STRICT_CFLAGS += $(call cc-option, -Wsuggest-attribute=malloc) # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands @@ -221,7 +223,9 @@ $(call OD, afs aft attribute blob mood playlist score server vss command \ CPPFLAGS += $(osl_cppflags) $(call OD, compress_filter): CFLAGS += -O3 +$(call OD, openssl): CFLAGS += -Wno-deprecated-declarations +$(object_dir)/%.o: %.c | $(object_dir) $(dep_dir) $(lsg_h) $(yy_h) define CC_CMD $(call SAY, CC $<) $(CC) -c -o $(object_dir)/$(*F).o -MMD -MF \