summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyeshkkumar <priyeshkkumar@gmail.com>2020-07-22 16:52:51 +0530
committerPriyeshkkumar <priyeshkkumar@gmail.com>2020-07-22 16:52:51 +0530
commit9bd35c7d916ee975b18fef6ddc0b65a6729609a2 (patch)
tree931d68fc3c6eb8cb6e787e865b6855df2d2b6b81
parentdf53385b6735a931afe4b4a613259357f22718ec (diff)
downloadfreetype2-9bd35c7d916ee975b18fef6ddc0b65a6729609a2.tar.gz
Updated builds/toplevel.mk for builds that don't use ./configure
-rw-r--r--[priyesh]ChangeLog12
-rw-r--r--builds/compiler/gcc.mk2
-rw-r--r--builds/toplevel.mk16
-rw-r--r--builds/unix/unix-cc.in2
-rw-r--r--src/base/ftdebug.c6
-rw-r--r--src/dlg/rules.mk1
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 <priyeshkkumar@gmail.com>
+
+ * 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 <priyeshkkumar@gmail.com>
* 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="<ftconfig.h>" \
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
$DFT_CONFIG_OPTIONS_H="<ftoption.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)) \