blob: 3f911de42392617f15d3787e8b95803e910c3f85 [file] [log] [blame]
David Turner74043012000-07-08 00:22:20 +00001#
2# FreeType 2 modules sub-Makefile
3#
4
Werner Lemberg47a5f412000-10-17 03:38:43 +00005
David Turner74043012000-07-08 00:22:20 +00006# 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 Lemberg594f0c92000-12-20 22:09:41 +000023.PHONY: make_module_list clean_module_list
David Turner74043012000-07-08 00:22:20 +000024
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 Turner046f7a02000-09-15 22:42:06 +000028ifndef MODULE_LIST
David Turner896b6042000-10-03 17:51:29 +000029 MODULE_LIST := $(TOP)$(SEP)include$(SEP)$(PROJECT)$(SEP)config$(SEP)ftmodule.h
David Turner74043012000-07-08 00:22:20 +000030endif
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 Lemberg389acc62001-01-01 17:25:21 +000035# an ftmodule.h file.
David Turner74043012000-07-08 00:22:20 +000036#
David Turner046f7a02000-09-15 22:42:06 +000037#$(MODULE_LIST): make_module_list
David Turner74043012000-07-08 00:22:20 +000038
Werner Lemberg389acc62001-01-01 17:25:21 +000039
40ifneq ($(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))
44else
45 OPEN_MODULE := @echo "
46 CLOSE_MODULE := " >> $(MODULE_LIST)
47 REMOVE_MODULE := @-$(DELETE) $(MODULE_LIST)
48endif
49
50
David Turner74043012000-07-08 00:22:20 +000051# Before the modules list file can be generated, we must remove the file in
52# order to `clean' the list.
53#
54clean_module_list:
Werner Lemberg389acc62001-01-01 17:25:21 +000055 $(REMOVE_MODULE)
David Turner046f7a02000-09-15 22:42:06 +000056 @-echo Regenerating the modules list in $(MODULE_LIST)...
David Turner74043012000-07-08 00:22:20 +000057
58make_module_list: clean_module_list
59 @echo done.
60
David Turner74043012000-07-08 00:22:20 +000061# $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
62# in the `module.mk' rules file.
63#
64OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
65CLOSE_DRIVER := )$(CLOSE_MODULE)
66
Werner Lemberg33d02362000-12-06 16:31:30 +000067ECHO_DRIVER := @echo "* module:$(space)
David Turner74043012000-07-08 00:22:20 +000068ECHO_DRIVER_DESC := (
69ECHO_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#
74include $(wildcard $(TOP)/src/*/module.mk)
75
76# EOF