diff options
author | Priyeshkkumar <priyeshkkumar@gmail.com> | 2020-08-26 12:27:52 +0530 |
---|---|---|
committer | Priyeshkkumar <priyeshkkumar@gmail.com> | 2020-08-26 12:27:52 +0530 |
commit | c2da552c7f39cb2add761203a97213322f0dbbf6 (patch) | |
tree | 98332048da14990bc2a1e3d44f456a64f392cbd1 /builds | |
parent | 62e5220edb7274297c5b3a4bf44fe4e67283346c (diff) | |
download | freetype2-c2da552c7f39cb2add761203a97213322f0dbbf6.tar.gz |
[builds] Make necessary changes to compile dlg along with FreeType.
* autogen.sh (copy_submodule_files): New script to copy all the
necessary dlg's source and include files from `submodules/dlg' to
`src/dlg'
* src/dlg/dlgwrap.c: A wrapper along `src/dlg.c', it enables the
dlg's build only when `FT_LOGGING' maro is defined.
* src/dlg/rules.mk: Makefile to compile dlg library along with
rest of FreeType's modules.
* builds/freetype.mk (DLG_DIR): New variable to include dlg's
header files.
(INCLUDES): Added `DLG_DIR'.
(FT_CFLAGS): Added `-std=c99' flag.
Include `src/dlg/rules.mk' file to build dlg.
(OBJ_S, OBJ_M): Added `DLG_OBJS_M' and `DLG_OBJS_S'.
* builds/toplevel.mk: For builds directly from the git repository
we need to copy files from `submodule/dlg' to `src/dlg
* {include/freetype/config, devel}/ftoption.h (FT_LOGGING): A new
macro to enable or disable the logging facility in FreeType.
Diffstat (limited to 'builds')
-rw-r--r-- | builds/freetype.mk | 9 | ||||
-rw-r--r-- | builds/toplevel.mk | 17 |
2 files changed, 23 insertions, 3 deletions
diff --git a/builds/freetype.mk b/builds/freetype.mk index 1d7eeb601..5eb79f392 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -101,6 +101,7 @@ PUBLIC_DIR := $(TOP_DIR)/include/freetype INTERNAL_DIR := $(PUBLIC_DIR)/internal SERVICES_DIR := $(INTERNAL_DIR)/services CONFIG_DIR := $(PUBLIC_DIR)/config +DLG_DIR := $(TOP_DIR)/src/dlg # The documentation directory. # @@ -122,6 +123,7 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ $(DEVEL_DIR) \ $(BUILD_DIR) \ + $(DLG_DIR) \ $(TOP_DIR)/include) INCLUDE_FLAGS := $(INCLUDES:%=$I%) @@ -152,7 +154,7 @@ endif # FT_CFLAGS = $(CPPFLAGS) \ $(CFLAGS) \ - $DFT2_BUILD_LIBRARY + $DFT2_BUILD_LIBRARY -std=c99 FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS) @@ -220,6 +222,7 @@ $(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H) # include $(SRC_DIR)/base/rules.mk include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES)) +include $(SRC_DIR)/dlg/rules.mk # ftinit component @@ -260,8 +263,8 @@ endif # All FreeType library objects. # -OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) -OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) +OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) $(DLG_OBJS_M) +OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) $(DLG_OBJS_S) # The target `multi' on the Make command line indicates that we want to diff --git a/builds/toplevel.mk b/builds/toplevel.mk index 5de61c113..b1cfb1334 100644 --- a/builds/toplevel.mk +++ b/builds/toplevel.mk @@ -103,6 +103,23 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),) check_platform := 1 endif +# For builds directly from the git repository we need to copy files +# from `submodule/dlg' to `src/dlg' +# +ifeq ($(wildcard src/dlg/dlg.*),) + ifeq ($(wildcard submodules/dlg/dlg.*),) + $(info Submodule check out in `submodules/dlg' ) + $(shell git submodule init) + $(shell git submodule update) + endif + + $(info Copying files from `submodules/dlg' to `src/dlg') + $(shell mkdir src/dlg/dlg) + $(shell cp submodules/dlg/include/dlg/dlg.h src/dlg/dlg) + $(shell cp submodules/dlg/include/dlg/output.h src/dlg/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. # |