ifneq ($(EXPORTS_LIST),)
# 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. # ifeq ($(CCexe),) CCexe := $(CC) endif
# TE acts like T, but for executables instead of object files. ifeq ($(TE),) TE := $T endif
# 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
# The `apinames' source and executable. We use $E_BUILD as the host # executable suffix, which includes the final dot. # # Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers. # APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c) APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
$(APINAMES_EXE): $(APINAMES_SRC) $(CCexe) $(CCexe_CFLAGS) $(TE)$@ $< $(CCexe_LDFLAGS)
.PHONY: symbols_list
symbols_list: $(EXPORTS_LIST)
# We manually add TT_New_Context and TT_RunIns, which are needed by TT # debuggers, to the EXPORTS_LIST. # $(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS) $(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS) @echo TT_New_Context >> $(EXPORTS_LIST) @echo TT_RunIns >> $(EXPORTS_LIST)
$(PROJECT_LIBRARY): $(EXPORTS_LIST)
CLEAN += $(EXPORTS_LIST) \ $(APINAMES_EXE)
endif