From 74ac39c1af5c8e85bf10711aed2ffc9dfee2e277 Mon Sep 17 00:00:00 2001 From: Wiimm Date: Sun, 28 May 2023 05:52:52 +0200 Subject: SZS v2.34a --- project/dclib/Makefile.inc | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) (limited to 'project/dclib/Makefile.inc') diff --git a/project/dclib/Makefile.inc b/project/dclib/Makefile.inc index b505f2e..feaf15d 100644 --- a/project/dclib/Makefile.inc +++ b/project/dclib/Makefile.inc @@ -13,6 +13,12 @@ # Wiimms source code library # # # ########################################################################### + # # + # Copyright (c) 2012-2023 by Dirk Clemens # + # # + ########################################################################### + +# make manual: https://www.gnu.org/software/make/manual/make.html #------------------------------------------------------------------------------ # standard object files @@ -69,32 +75,57 @@ ifeq ($(origin DCLIB_HAVE_USABLE_SIZE), undefined) endif #------------------------------------------------------------------------------ -# add libraries and guardian macros +# gcc version dependent cflags + +DCLIB_GCC = $(GCC) +ifeq ($(DCLIB_GCC),) + DCLIB_GCC := gcc +endif + +DCLIB_GCC_VERSION = $(shell $(DCLIB_GCC) -dumpversion) + +ifeq ($(shell expr $(DCLIB_GCC_VERSION) '>=' 7 ),1) + DCLIB_CFLAGS += -Wno-format-truncation +else + DCLIB_CFLAGS += -Wno-pragmas -Wno-unknown-pragmas +endif + +ifeq ($(shell expr $(DCLIB_GCC_VERSION) '>=' 9 ),1) + DCLIB_CFLAGS += -Wno-address-of-packed-member +endif + +#------------------------------------------------------------------------------ +# add object files and guardian macros ifeq ($(DCLIB_THREAD),1) DCLIB_O += dclib-thread.o - DCLIB_FLAGS += -DDCLIB_THREAD=1 + DCLIB_DEFINES += -DDCLIB_THREAD=1 endif ifeq ($(DCLIB_NETWORK),1) DCLIB_O += dclib-network.o dclib-punycode.o - DCLIB_FLAGS += -DDCLIB_NETWORK=1 + DCLIB_DEFINES += -DDCLIB_NETWORK=1 else DCLIB_MYSQL := 0 endif ifeq ($(DCLIB_MYSQL),1) DCLIB_O += dclib-mysql.o - DCLIB_FLAGS += -DDCLIB_MYSQL=1 + DCLIB_DEFINES += -DDCLIB_MYSQL=1 endif ifeq ($(DCLIB_TERMINAL),1) DCLIB_O += dclib-terminal.o dclib-command.o - DCLIB_FLAGS += -DDCLIB_TERMINAL=1 + DCLIB_DEFINES += -DDCLIB_TERMINAL=1 endif ifeq ($(DCLIB_HAVE_USABLE_SIZE),1) - DCLIB_FLAGS += -DDCLIB_HAVE_USABLE_SIZE=1 + DCLIB_DEFINES += -DDCLIB_HAVE_USABLE_SIZE=1 endif #------------------------------------------------------------------------------ + +# support for deprecated DCLIB_FLAGS (2023-04-14) +DCLIB_FLAGS := $(DCLIB_DEFINES) $(DCLIB_CFLAGS) + +#------------------------------------------------------------------------------ -- cgit v1.3.1