blob: 96b10db8747fea2b125e7e936ba66cdb82861a09 [file] [log] [blame]
David Turnerc1aef3f2005-10-28 19:24:11 +00001#
Werner Lemberg21ed6342005-11-11 15:59:33 +00002# FreeType 2 exports sub-Makefile
3#
4
5
Werner Lembergfd7456c2006-04-03 15:46:48 +00006# Copyright 2005, 2006 by
Werner Lemberg21ed6342005-11-11 15:59:33 +00007# David Turner, Robert Wilhelm, and Werner Lemberg.
8#
9# This file is part of the FreeType project, and may only be used, modified,
10# and distributed under the terms of the FreeType project license,
11# LICENSE.TXT. By continuing to use, modify, or distribute this file you
12# indicate that you have read the license and understand and accept it
13# fully.
14
15
16# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
17# OTHER MAKEFILES.
18
19
20# This sub-Makefile is used to compute the list of exported symbols whenever
21# the EXPORTS_LIST variable is defined by one of the platform or compiler
22# specific build files.
23#
24# EXPORTS_LIST contains the name of the `list' file, for example a Windows
25# .DEF file.
David Turnerc1aef3f2005-10-28 19:24:11 +000026#
27ifneq ($(EXPORTS_LIST),)
28
Werner Lemberg21ed6342005-11-11 15:59:33 +000029 # CCexe is the compiler used to compile the `apinames' tool program
30 # on the host machine. This isn't necessarily the same as the compiler
31 # which can be a cross-compiler for a different architecture, for example.
David Turnerc1aef3f2005-10-28 19:24:11 +000032 #
33 ifeq ($(CCexe),)
34 CCexe := $(CC)
35 endif
36
Werner Lemberg21ed6342005-11-11 15:59:33 +000037 # TE acts like T, but for executables instead of object files.
David Turnerc1aef3f2005-10-28 19:24:11 +000038 ifeq ($(TE),)
39 TE := $T
40 endif
41
Werner Lemberg21ed6342005-11-11 15:59:33 +000042 # The list of public headers we're going to parse.
David Turnerc1aef3f2005-10-28 19:24:11 +000043 PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h)
44
David Turnerd5ca7472007-01-10 14:18:15 +000045 # The `apinames' source and executable. We use $E_BUILD as the host
46 # executable suffix, which *includes* the final dot.
Werner Lemberg21ed6342005-11-11 15:59:33 +000047 #
48 # Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers.
David Turnerc1aef3f2005-10-28 19:24:11 +000049 #
suzuki toshiya30094172009-07-15 12:57:26 +090050 APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c)
51 APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
David Turnerc1aef3f2005-10-28 19:24:11 +000052
53 $(APINAMES_EXE): $(APINAMES_SRC)
suzuki toshiyaa03cb012012-06-14 17:56:01 +090054 $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
David Turnerc1aef3f2005-10-28 19:24:11 +000055
Werner Lembergfd7456c2006-04-03 15:46:48 +000056 .PHONY: symbols_list
David Turnerc1aef3f2005-10-28 19:24:11 +000057
58 symbols_list: $(EXPORTS_LIST)
59
Wu, Chia-I (吳佳一)35bfc0f2005-11-17 01:53:07 +000060 # We manually add TT_New_Context and TT_RunIns, which are needed by TT
61 # debuggers, to the EXPORTS_LIST.
62 #
David Turnerc1aef3f2005-10-28 19:24:11 +000063 $(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS)
Werner Lemberg21ed6342005-11-11 15:59:33 +000064 $(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS)
Wu, Chia-I (吳佳一)35bfc0f2005-11-17 01:53:07 +000065 @echo TT_New_Context >> $(EXPORTS_LIST)
Werner Lembergf2c53302005-11-11 16:20:59 +000066 @echo TT_RunIns >> $(EXPORTS_LIST)
David Turnerc1aef3f2005-10-28 19:24:11 +000067
68 $(PROJECT_LIBRARY): $(EXPORTS_LIST)
69
Werner Lembergfd7456c2006-04-03 15:46:48 +000070 CLEAN += $(EXPORTS_LIST) \
71 $(APINAMES_EXE)
David Turnerc1aef3f2005-10-28 19:24:11 +000072
Werner Lemberg21ed6342005-11-11 15:59:33 +000073endif
74
75
76# EOF