freetype2/builds/exports.mk

82 lines
2.2 KiB
Makefile
Raw Normal View History

2005-11-11 16:59:33 +01:00
#
# FreeType 2 exports sub-Makefile
#
# Copyright 2005 by
# 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.
2005-10-28 21:24:11 +02:00
PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h)
2005-11-11 16:59:33 +01:00
# The `apinames' source and executable. We use $E as the executable
# suffix, which *includes* the final dot.
#
# Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers.
2005-10-28 21:24:11 +02:00
#
APINAMES_SRC := $(TOP_DIR)/src/tools/apinames.c
APINAMES_EXE := $(OBJ_DIR)/apinames$E
$(APINAMES_EXE): $(APINAMES_SRC)
2005-11-11 16:59:33 +01:00
$(CCexe) $(TE)$@ $<
2005-10-28 21:24:11 +02:00
2005-11-11 16:59:33 +01:00
.PHONY: symbols_list clean_symbols_list clean_apinames
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_symbols_list:
2005-11-11 16:59:33 +01:00
-$(DELETE) $(subst /,$(SEP),$(EXPORTS_LIST))
2005-10-28 21:24:11 +02:00
clean_apinames:
2005-11-11 16:59:33 +01:00
-$(DELETE) $(subst /,$(SEP),$(APINAMES_EXE))
2005-10-28 21:24:11 +02:00
clean_project: clean_symbols_list clean_apinames
2005-11-11 16:59:33 +01:00
endif
# EOF