2 # FreeType 2 modules sub-Makefile
5 # Copyright 1996-2000 by
6 # David Turner, Robert Wilhelm, and Werner Lemberg.
8 # This file is part of the FreeType project, and may only be used, modified,
9 # and distributed under the terms of the FreeType project license,
10 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
11 # indicate that you have read the license and understand and accept it
15 # DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
19 # This file is in charge of handling the generation of the modules list
22 .PHONY: make_module_list clean_module_list remake_module_list
24 # MODULE_LIST, as its name suggests, indicates where the modules list
25 # resides. For now, it is in `include/freetype/config/ftmodule.h'.
28 FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
31 # To build the modules list, we invoke the `make_module_list' target.
33 # This rule is commented out by default since FreeType comes already with
36 #$(FT_MODULE_LIST): make_module_list
38 # Before the modules list file can be generated, we must remove the file in
39 # order to `clean' the list.
42 @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST))
43 @-echo Regenerating the modules list in $(FT_MODULE_LIST)...
45 make_module_list: clean_module_list
49 # Trailing spaces are protected with a `#' sign to avoid accidental
52 ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
53 OPEN_MODULE := @echo #
54 CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST))
56 OPEN_MODULE := @echo "
57 CLOSE_MODULE := " >> $(FT_MODULE_LIST)
60 # $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
61 # in the `module.mk' rules file.
63 OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
64 CLOSE_DRIVER := )$(CLOSE_MODULE)
66 ECHO_DRIVER := @echo "* module: #
68 ECHO_DRIVER_DONE := )"
70 # Each `module.mk' in the `src' sub-dirs is used to add one rule to the
71 # target `make_module_list'.
73 include $(wildcard $(TOP)/src/*/module.mk)