David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 1 | # |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 2 | # FreeType 2 exports sub-Makefile |
| 3 | # |
| 4 | |
| 5 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 6 | # Copyright 2005, 2006 by |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 7 | # 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 Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 26 | # |
| 27 | ifneq ($(EXPORTS_LIST),) |
| 28 | |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 29 | # 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 Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 32 | # |
| 33 | ifeq ($(CCexe),) |
| 34 | CCexe := $(CC) |
| 35 | endif |
| 36 | |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 37 | # TE acts like T, but for executables instead of object files. |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 38 | ifeq ($(TE),) |
| 39 | TE := $T |
| 40 | endif |
| 41 | |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 42 | # The list of public headers we're going to parse. |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 43 | PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h) |
| 44 | |
David Turner | d5ca747 | 2007-01-10 14:18:15 +0000 | [diff] [blame] | 45 | # The `apinames' source and executable. We use $E_BUILD as the host |
| 46 | # executable suffix, which *includes* the final dot. |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 47 | # |
| 48 | # Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers. |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 49 | # |
suzuki toshiya | 3009417 | 2009-07-15 12:57:26 +0900 | [diff] [blame] | 50 | APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c) |
| 51 | APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD)) |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 52 | |
| 53 | $(APINAMES_EXE): $(APINAMES_SRC) |
suzuki toshiya | a03cb01 | 2012-06-14 17:56:01 +0900 | [diff] [blame] | 54 | $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS) |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 55 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 56 | .PHONY: symbols_list |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 57 | |
| 58 | symbols_list: $(EXPORTS_LIST) |
| 59 | |
Wu, Chia-I (吳佳一) | 35bfc0f | 2005-11-17 01:53:07 +0000 | [diff] [blame] | 60 | # We manually add TT_New_Context and TT_RunIns, which are needed by TT |
| 61 | # debuggers, to the EXPORTS_LIST. |
| 62 | # |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 63 | $(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS) |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 64 | $(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS) |
Wu, Chia-I (吳佳一) | 35bfc0f | 2005-11-17 01:53:07 +0000 | [diff] [blame] | 65 | @echo TT_New_Context >> $(EXPORTS_LIST) |
Werner Lemberg | f2c5330 | 2005-11-11 16:20:59 +0000 | [diff] [blame] | 66 | @echo TT_RunIns >> $(EXPORTS_LIST) |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 67 | |
| 68 | $(PROJECT_LIBRARY): $(EXPORTS_LIST) |
| 69 | |
Werner Lemberg | fd7456c | 2006-04-03 15:46:48 +0000 | [diff] [blame] | 70 | CLEAN += $(EXPORTS_LIST) \ |
| 71 | $(APINAMES_EXE) |
David Turner | c1aef3f | 2005-10-28 19:24:11 +0000 | [diff] [blame] | 72 | |
Werner Lemberg | 21ed634 | 2005-11-11 15:59:33 +0000 | [diff] [blame] | 73 | endif |
| 74 | |
| 75 | |
| 76 | # EOF |