freetype2/builds/exports.mk

81 lines
2.3 KiB
Makefile
Raw Normal View History

2005-11-11 16:59:33 +01:00
#
# FreeType 2 exports sub-Makefile
#
2017-01-04 20:16:34 +01:00
# Copyright 2005-2017 by
2005-11-11 16:59:33 +01:00
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
# OTHER MAKEFILES.
# This sub-Makefile is used to compute the list of exported symbols whenever
2005-10-28 21:24:11 +02:00
# the EXPORTS_LIST variable is defined by one of the platform or compiler
2005-11-11 16:59:33 +01:00
# specific build files.
2005-10-28 21:24:11 +02:00
#
2005-11-11 16:59:33 +01:00
# EXPORTS_LIST contains the name of the `list' file, for example a Windows
# .DEF file.
2005-10-28 21:24:11 +02:00
#
ifneq ($(EXPORTS_LIST),)
2005-11-11 16:59:33 +01:00
# CCexe is the compiler used to compile the `apinames' tool program
# on the host machine. This isn't necessarily the same as the compiler
# which can be a cross-compiler for a different architecture, for example.
2005-10-28 21:24:11 +02:00
#
ifeq ($(CCexe),)
CCexe := $(CC)
endif
2005-11-11 16:59:33 +01:00
# TE acts like T, but for executables instead of object files.
2005-10-28 21:24:11 +02:00
ifeq ($(TE),)
TE := $T
endif
2005-11-11 16:59:33 +01:00
# The list of public headers we're going to parse.
PUBLIC_HEADERS := $(filter-out $(PUBLIC_DIR)/ftmac.h, \
$(wildcard $(PUBLIC_DIR)/*.h))
ifneq ($(ftmac_c),)
PUBLIC_HEADERS += $(PUBLIC_DIR)/ftmac.h
endif
2005-10-28 21:24:11 +02:00
# The `apinames' source and executable. We use $E_BUILD as the host
# executable suffix, which *includes* the final dot.
2005-11-11 16:59:33 +01:00
#
# Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers.
2005-10-28 21:24:11 +02:00
#
APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c)
APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
2005-10-28 21:24:11 +02:00
$(APINAMES_EXE): $(APINAMES_SRC)
$(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
2005-10-28 21:24:11 +02:00
.PHONY: symbols_list
2005-10-28 21:24:11 +02:00
symbols_list: $(EXPORTS_LIST)
# We manually add TT_New_Context and TT_RunIns, which are needed by TT
# debuggers, to the EXPORTS_LIST.
#
2005-10-28 21:24:11 +02:00
$(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS)
2005-11-11 16:59:33 +01:00
$(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS)
@echo TT_New_Context >> $(EXPORTS_LIST)
@echo TT_RunIns >> $(EXPORTS_LIST)
2005-10-28 21:24:11 +02:00
$(PROJECT_LIBRARY): $(EXPORTS_LIST)
CLEAN += $(EXPORTS_LIST) \
$(APINAMES_EXE)
2005-10-28 21:24:11 +02:00
2005-11-11 16:59:33 +01:00
endif
# EOF