From 9bd35c7d916ee975b18fef6ddc0b65a6729609a2 Mon Sep 17 00:00:00 2001 From: Priyeshkkumar Date: Wed, 22 Jul 2020 16:52:51 +0530 Subject: [PATCH] Updated builds/toplevel.mk for builds that don't use ./configure --- [priyesh]ChangeLog | 12 ++++++++++++ builds/compiler/gcc.mk | 2 +- builds/toplevel.mk | 16 ++++++++++++++++ builds/unix/unix-cc.in | 2 +- src/base/ftdebug.c | 6 +++--- src/dlg/rules.mk | 1 + 6 files changed, 34 insertions(+), 5 deletions(-) diff --git a/[priyesh]ChangeLog b/[priyesh]ChangeLog index ec9d9c6e7..b8519db8d 100644 --- a/[priyesh]ChangeLog +++ b/[priyesh]ChangeLog @@ -1,3 +1,15 @@ +2020-07-22 Priyesh Kumar + + * Updated `builds/toplevel.mk' so that for builds that do not use + `./configure' script dlg files are copied from `submodules/dlg' to + `src/dlg'. + + * Removed `-std=c99' flag from `gcc.mk' and `unix-cc.in'. + + * src/base/ftdebug.c: Minor changes + + * src/dlg/rules.mk: Added `-std=c99' flag in `FT_CFLAGS' varialble + 2020-07-21 Priyesh Kumar * builds/freetype.mk: Updates to build dlg along with rest of base and diff --git a/builds/compiler/gcc.mk b/builds/compiler/gcc.mk index 0a9b97ad4..22e32f795 100644 --- a/builds/compiler/gcc.mk +++ b/builds/compiler/gcc.mk @@ -61,7 +61,7 @@ T := -o$(space) # Use the ANSIFLAGS variable to define the compiler flags used to enfore # ANSI compliance. # -CFLAGS ?= -c -g -O3 -Wall -std=c99 +CFLAGS ?= -c -g -O3 -Wall # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant. # diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 5de61c113..b79f310db 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -103,6 +103,22 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),) check_platform := 1 endif +# For builds that don't use `./configure' script we need to copy files +# from `submodule/dlg' to `src/dlg' +# +ifeq ($(wildcard src/dlg/dlg.*),) + ifeq ($(wildcard submodules/dlg/.*),) + $(info Submodule check out in `submodules/slg' ) + $(shell git submodule init) + $(shell git submodule update) + endif + + $(info Copying files from `submodules/dlg' to `src/dlg') + $(shell cp submodules/dlg/include/dlg/dlg.h src/dlg/) + $(shell cp submodules/dlg/include/dlg/output.h src/dlg/) + $(shell cp submodules/dlg/src/dlg/dlg.c src/dlg/) +endif + # Include the automatic host platform detection rules when we need to # check the platform. # diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in index 6dbf399b6..30d097b23 100644 --- a/builds/unix/unix-cc.in +++ b/builds/unix/unix-cc.in @@ -79,7 +79,7 @@ T := -o$(space) # We use our own FreeType configuration files overriding defaults. # CPPFLAGS := @CPPFLAGS@ -CFLAGS := -c -std=c99 @XX_CFLAGS@ @CFLAGS@ \ +CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ \ $DFT_CONFIG_CONFIG_H="" \ $DFT_CONFIG_MODULES_H="" \ $DFT_CONFIG_OPTIONS_H="" diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c index c60cb3879..6f925b43c 100644 --- a/src/base/ftdebug.c +++ b/src/base/ftdebug.c @@ -306,7 +306,7 @@ else p++; } } -#endif +#endif /* FT_LOGGING */ /* read toggle name, followed by ':' */ q = p; while ( *p && *p != ':' ) @@ -543,14 +543,14 @@ else FT_BASE_DEF( void ) ft_add_tag( const char* tag ) { - (void) tag; + FT_UNUSED(tag); /* nothing */ } FT_BASE_DEF( void ) ft_remove_tag( const char* tag ) { - (void) tag; + FT_UNUSED (tag); /* nothing */ } diff --git a/src/dlg/rules.mk b/src/dlg/rules.mk index 08d0ed02d..67d5a893d 100644 --- a/src/dlg/rules.mk +++ b/src/dlg/rules.mk @@ -17,6 +17,7 @@ # DLG_DIR := $(SRC_DIR)/dlg +FT_CFLAGS += -std=c99 DLG_COMPILE := $(CC) $(ANSIFLAGS) \ $I$(subst /,$(COMPILER_SEP),$(DLG_DIR)) \