forked from minhngoc25a/freetype2
* builds/freetype.mk: Refactor for readability.
This commit is contained in:
parent
49967cb610
commit
de60e7d3f8
|
@ -1,3 +1,7 @@
|
||||||
|
2020-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
|
* builds/freetype.mk: Refactor for readability.
|
||||||
|
|
||||||
2020-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2020-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
[builds] Clean up Windows CE project files.
|
[builds] Clean up Windows CE project files.
|
||||||
|
|
|
@ -127,11 +127,12 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
|
||||||
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
|
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
|
||||||
|
|
||||||
ifdef DEVEL_DIR
|
ifdef DEVEL_DIR
|
||||||
# We assume that all library dependencies for FreeType are fulfilled for a
|
# We assume that library dependencies defined in `ftoption.c' are fulfilled
|
||||||
# development build, so we directly access the necessary include directory
|
# for a development build, so we directly access the necessary include
|
||||||
# information using `pkg-config'.
|
# directory information using `pkg-config'.
|
||||||
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
|
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng)
|
||||||
harfbuzz )
|
INCLUDE_FLAGS += $(shell pkg-config --cflags harfbuzz)
|
||||||
|
INCLUDE_FLAGS += $(shell pkg-config --cflags libbrotlidec)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,22 +147,14 @@ endif
|
||||||
# FreeType. This is required to let our sources include the internal
|
# FreeType. This is required to let our sources include the internal
|
||||||
# headers (something forbidden by clients).
|
# headers (something forbidden by clients).
|
||||||
#
|
#
|
||||||
# Finally, we define FT_CONFIG_MODULES_H so that the compiler uses the
|
|
||||||
# generated version of `ftmodule.h' in $(OBJ_DIR). If there is an
|
|
||||||
# `ftoption.h' files in $(OBJ_DIR), define FT_CONFIG_OPTIONS_H too.
|
|
||||||
#
|
|
||||||
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
|
|
||||||
FTOPTION_H := $(OBJ_DIR)/ftoption.h
|
|
||||||
else ifneq ($(wildcard $(BUILD_DIR)/ftoption.h),)
|
|
||||||
FTOPTION_H := $(BUILD_DIR)/ftoption.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
# `CPPFLAGS' might be specified by the user in the environment.
|
# `CPPFLAGS' might be specified by the user in the environment.
|
||||||
#
|
#
|
||||||
FT_CFLAGS = $(CPPFLAGS) \
|
FT_CFLAGS = $(CPPFLAGS) \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
$DFT2_BUILD_LIBRARY
|
$DFT2_BUILD_LIBRARY
|
||||||
|
|
||||||
|
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# Include the `exports' rules file.
|
# Include the `exports' rules file.
|
||||||
#
|
#
|
||||||
|
@ -175,11 +168,17 @@ OBJECTS_LIST :=
|
||||||
|
|
||||||
# Define $(PUBLIC_H) as the list of all public header files located in
|
# Define $(PUBLIC_H) as the list of all public header files located in
|
||||||
# `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined
|
# `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined
|
||||||
# similarly.
|
# similarly. $(FTOPTION_H) is the option file used in the compilation.
|
||||||
#
|
#
|
||||||
# This is used to simplify the dependency rules -- if one of these files
|
# This is used to simplify the dependency rules -- if one of these files
|
||||||
# changes, the whole library is recompiled.
|
# changes, the whole library is recompiled.
|
||||||
#
|
#
|
||||||
|
ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
|
||||||
|
FTOPTION_H := $(OBJ_DIR)/ftoption.h
|
||||||
|
else ifneq ($(wildcard $(BUILD_DIR)/ftoption.h),)
|
||||||
|
FTOPTION_H := $(BUILD_DIR)/ftoption.h
|
||||||
|
endif
|
||||||
|
|
||||||
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
|
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
|
||||||
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
|
INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
|
||||||
$(wildcard $(SERVICES_DIR)/*.h)
|
$(wildcard $(SERVICES_DIR)/*.h)
|
||||||
|
@ -192,8 +191,6 @@ DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
|
||||||
FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H)
|
FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H)
|
||||||
|
|
||||||
|
|
||||||
FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS)
|
|
||||||
|
|
||||||
# ftsystem component
|
# ftsystem component
|
||||||
#
|
#
|
||||||
FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
|
FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
|
||||||
|
|
|
@ -76,7 +76,7 @@ T := -o$(space)
|
||||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||||
# ANSI compliance.
|
# ANSI compliance.
|
||||||
#
|
#
|
||||||
# We use our own FreeType configuration file.
|
# We use our own FreeType configuration files overriding defaults.
|
||||||
#
|
#
|
||||||
CPPFLAGS := @CPPFLAGS@
|
CPPFLAGS := @CPPFLAGS@
|
||||||
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ \
|
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ \
|
||||||
|
|
Loading…
Reference in New Issue