1 | # |
---|
2 | # FreeType 2 modules sub-Makefile |
---|
3 | # |
---|
4 | |
---|
5 | |
---|
6 | # Copyright 1996-2000 by |
---|
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 file is in charge of handling the generation of the modules list |
---|
21 | # file. |
---|
22 | |
---|
23 | .PHONY: make_module_list clean_module_list |
---|
24 | |
---|
25 | # MODULE_LIST, as its name suggests, indicates where the modules list |
---|
26 | # resides. For now, it is in `include/freetype/config/ftmodule.h'. |
---|
27 | # |
---|
28 | ifndef MODULE_LIST |
---|
29 | MODULE_LIST := $(TOP_DIR)$(SEP)include$(SEP)$(PROJECT)$(SEP)config$(SEP)ftmodule.h |
---|
30 | endif |
---|
31 | |
---|
32 | # To build the modules list, we invoke the `make_module_list' target. |
---|
33 | # |
---|
34 | # This rule is commented out by default since FreeType comes already with |
---|
35 | # an ftmodule.h file. |
---|
36 | # |
---|
37 | #$(MODULE_LIST): make_module_list |
---|
38 | |
---|
39 | |
---|
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)) |
---|
44 | else |
---|
45 | OPEN_MODULE := @echo " |
---|
46 | CLOSE_MODULE := " >> $(MODULE_LIST) |
---|
47 | REMOVE_MODULE := @-$(DELETE) $(MODULE_LIST) |
---|
48 | endif |
---|
49 | |
---|
50 | |
---|
51 | # Before the modules list file can be generated, we must remove the file in |
---|
52 | # order to `clean' the list. |
---|
53 | # |
---|
54 | clean_module_list: |
---|
55 | $(REMOVE_MODULE) |
---|
56 | @-echo Regenerating the modules list in $(MODULE_LIST)... |
---|
57 | |
---|
58 | make_module_list: clean_module_list |
---|
59 | @echo done. |
---|
60 | |
---|
61 | # $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver |
---|
62 | # in the `module.mk' rules file. |
---|
63 | # |
---|
64 | OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE( |
---|
65 | CLOSE_DRIVER := )$(CLOSE_MODULE) |
---|
66 | |
---|
67 | ECHO_DRIVER := @echo "* module:$(space) |
---|
68 | ECHO_DRIVER_DESC := ( |
---|
69 | ECHO_DRIVER_DONE := )" |
---|
70 | |
---|
71 | # Each `module.mk' in the `src' sub-dirs is used to add one rule to the |
---|
72 | # target `make_module_list'. |
---|
73 | # |
---|
74 | include $(wildcard $(TOP_DIR)/src/*/module.mk) |
---|
75 | |
---|
76 | # EOF |
---|