David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 1 | # |
| 2 | # FreeType 2 modules sub-Makefile |
| 3 | # |
| 4 | |
Werner Lemberg | 47a5f41 | 2000-10-17 03:38:43 +0000 | [diff] [blame] | 5 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 | |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 23 | .PHONY: make_module_list clean_module_list |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 | # |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 28 | ifndef MODULE_LIST |
David Turner | 896b604 | 2000-10-03 17:51:29 +0000 | [diff] [blame] | 29 | MODULE_LIST := $(TOP)$(SEP)include$(SEP)$(PROJECT)$(SEP)config$(SEP)ftmodule.h |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 |
Werner Lemberg | 389acc6 | 2001-01-01 17:25:21 +0000 | [diff] [blame] | 35 | # an ftmodule.h file. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 36 | # |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 37 | #$(MODULE_LIST): make_module_list |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 38 | |
Werner Lemberg | 389acc6 | 2001-01-01 17:25:21 +0000 | [diff] [blame] | 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 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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: |
Werner Lemberg | 389acc6 | 2001-01-01 17:25:21 +0000 | [diff] [blame] | 55 | $(REMOVE_MODULE) |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 56 | @-echo Regenerating the modules list in $(MODULE_LIST)... |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 57 | |
| 58 | make_module_list: clean_module_list |
| 59 | @echo done. |
| 60 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 | |
Werner Lemberg | 33d0236 | 2000-12-06 16:31:30 +0000 | [diff] [blame] | 67 | ECHO_DRIVER := @echo "* module:$(space) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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)/src/*/module.mk) |
| 75 | |
| 76 | # EOF |