2 # FreeType 2 modules sub-Makefile
6 # Copyright 1996-2000 by
7 # David Turner, Robert Wilhelm, and Werner Lemberg.
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
16 # DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
20 # This file is in charge of handling the generation of the modules list
23 .PHONY: make_module_list clean_module_list
25 # MODULE_LIST, as its name suggests, indicates where the modules list
26 # resides. For now, it is in `include/freetype/config/ftmodule.h'.
29 MODULE_LIST := $(TOP_DIR)$(SEP)include$(SEP)$(PROJECT)$(SEP)config$(SEP)ftmodule.h
32 # To build the modules list, we invoke the `make_module_list' target.
34 # This rule is commented out by default since FreeType comes already with
37 #$(MODULE_LIST): make_module_list
40 ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
41 OPEN_MODULE := @echo$(space)
42 CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
43 REMOVE_MODULE := @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
45 OPEN_MODULE := @echo "
46 CLOSE_MODULE := " >> $(MODULE_LIST)
47 REMOVE_MODULE := @-$(DELETE) $(MODULE_LIST)
51 # Before the modules list file can be generated, we must remove the file in
52 # order to `clean' the list.
56 @-echo Regenerating the modules list in $(MODULE_LIST)...
58 make_module_list: clean_module_list
61 # $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
62 # in the `module.mk' rules file.
64 OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
65 CLOSE_DRIVER := )$(CLOSE_MODULE)
67 ECHO_DRIVER := @echo "* module:$(space)
69 ECHO_DRIVER_DONE := )"
71 # Each `module.mk' in the `src' sub-dirs is used to add one rule to the
72 # target `make_module_list'.
74 include $(wildcard $(TOP_DIR)/src/*/module.mk)