Added the file `config/modules.mk' used to generate the file `config/<platform>/ftmodule.h' which contains the list of available font drivers. The list can be re-generated with "make modules" from the top directory
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
diff --git a/config/ansi/ftmodule.h b/config/ansi/ftmodule.h
new file mode 100644
index 0000000..e87e49d
--- /dev/null
+++ b/config/ansi/ftmodule.h
@@ -0,0 +1,3 @@
+FT_DRIVER(sfnt_driver_interface)
+FT_DRIVER(tt_driver_interface)
+FT_DRIVER(t1_driver_interface)
diff --git a/config/dos/ftmodule.h b/config/dos/ftmodule.h
new file mode 100644
index 0000000..e87e49d
--- /dev/null
+++ b/config/dos/ftmodule.h
@@ -0,0 +1,3 @@
+FT_DRIVER(sfnt_driver_interface)
+FT_DRIVER(tt_driver_interface)
+FT_DRIVER(t1_driver_interface)
diff --git a/config/freetype.mk b/config/freetype.mk
index 4f78e08..711e0ae 100644
--- a/config/freetype.mk
+++ b/config/freetype.mk
@@ -19,6 +19,10 @@
#****************************************************************************
+# include the 'modules' rules file
+#
+include $(TOP)/config/modules.mk
+
# The targets `objects', `library' and `multiple' are defined
# at the end of this Makefile when all rules have been included..
#
@@ -90,13 +94,6 @@ COMPONENTS_LIST :=
DRIVERS_LIST :=
OBJECTS_LIST :=
-# free the list of 'ftinit' variables
-#
-FTINIT_DRIVER_PATHS :=
-FTINIT_DRIVER_H :=
-FTINIT_DRIVER_MACROS :=
-
-
# System-specific component - this must be defined in this Makefile
# for easy updates
#
@@ -152,7 +149,7 @@ include $(wildcard $(SRC)/*/rules.mk)
FTINIT_SRC := $(BASE_DIR)$(SEP)ftinit.c
FTINIT_OBJ := $(OBJ_)ftinit.$O
-$(FTINIT_OBJ): $(FTINIT_SRC) $(BASE_H) $(FTINIT_DRIVER_H)
+$(FTINIT_OBJ): $(FTINIT_SRC) $(BASE_H) $(FTINIT_DRIVER_H) $(FT_MODULE_LIST)
$(FT_COMPILE) $(FTINIT_DRIVER_PATHS:%=$I%) \
$(FTINIT_DRIVER_MACROS:%=$D%) $T$@ $<
diff --git a/config/modules.mk b/config/modules.mk
new file mode 100644
index 0000000..0ad7db1
--- /dev/null
+++ b/config/modules.mk
@@ -0,0 +1,67 @@
+#****************************************************************************
+#* *
+#* FreeType modules sub-Makefile *
+#* *
+#* Copyright 1996-1999 by *
+#* David Turner, Robert Wilhelm, and Werner Lemberg. *
+#* *
+#* This file is part of the FreeType project, and may only be used *
+#* modified and distributed under the terms of the FreeType project *
+#* license, LICENSE.TXT. By continuing to use, modify, or distribute *
+#* this file you indicate that you have read the license and *
+#* understand and accept it fully. *
+#* *
+#* *
+#* *
+#* DO NOT INVOKE THIS MAKEFILE DIRECTLY. IT IS MEANT TO BE INCLUDED BY *
+#* OTHER MAKEFILES. *
+#* *
+#* This file is in charge of handling the generation of the modules list *
+#* file, normally located in `config/<platform>/modules'. *
+#* *
+#****************************************************************************
+
+.PHONY: make_module_list clean_module_list remake_module_list
+
+# MODULE_LIST, as it name suggests, indicate where the modules list
+# reside. For now, it is in $(BUILD)/ftmodule.h
+#
+FT_MODULE_LIST := $(BUILD)$(SEP)ftmodule.h
+
+# To build the modules list, we invoke the `make_module_list' target
+#
+#$(FT_MODULE_LIST): make_module_list
+
+# Before the modules list file can be generated, we must remove the
+# file in order to `clean' the list
+#
+clean_module_list:
+ @$(DELETE) $(FT_MODULE_LIST)
+ @echo Regenerating the font drivers list in '$(FT_MODULE_LIST)'
+
+make_module_list: clean_module_list
+ @echo -- done --
+
+ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
+OPEN_MODULE := @echo
+CLOSE_MODULE := >> $(FT_MODULE_LIST)
+else
+OPEN_MODULE := @echo "
+CLOSE_MODULE := " >> $(FT_MODULE_LIST)
+endif
+
+# OPEN_DRIVER & CLOSE_DRIVER are used to specify a given font driver
+# in the `module.mk' rules file
+#
+OPEN_DRIVER := $(OPEN_MODULE)FT_DRIVER(
+CLOSE_DRIVER := )$(CLOSE_MODULE)
+
+ECHO_DRIVER := @echo "* driver:
+ECHO_DRIVER_DESC := (
+ECHO_DRIVER_DONE := )"
+
+# each `module.mk' in the `src' sub-dirs is used to add one rule to
+# the target `make_module_list'.
+#
+include $(wildcard $(TOP)/src/*/module.mk)
+
diff --git a/config/os2/ftmodule.h b/config/os2/ftmodule.h
new file mode 100644
index 0000000..e87e49d
--- /dev/null
+++ b/config/os2/ftmodule.h
@@ -0,0 +1,3 @@
+FT_DRIVER(sfnt_driver_interface)
+FT_DRIVER(tt_driver_interface)
+FT_DRIVER(t1_driver_interface)
diff --git a/config/unix/detect.mk b/config/unix/detect.mk
index 3d39c64..0ec120b 100644
--- a/config/unix/detect.mk
+++ b/config/unix/detect.mk
@@ -17,7 +17,14 @@ PLATFORM := unix
COPY := cp
DELETE := rm -f
+# if `devel' is the requested target, use the development Makefile
+#
+ifneq ($(findstring devel,$(MAKECMDGOALS)),)
+CONFIG_RULES := $(BUILD)$(SEP)Makefile.devel
+devel: ;
+else
CONFIG_RULES := $(BUILD)$(SEP)Makefile
+endif
setup: std_setup
diff --git a/config/unix/ftmodule.h b/config/unix/ftmodule.h
new file mode 100644
index 0000000..e87e49d
--- /dev/null
+++ b/config/unix/ftmodule.h
@@ -0,0 +1,3 @@
+FT_DRIVER(sfnt_driver_interface)
+FT_DRIVER(tt_driver_interface)
+FT_DRIVER(t1_driver_interface)
diff --git a/config/win32/ftmodule.h b/config/win32/ftmodule.h
new file mode 100644
index 0000000..e87e49d
--- /dev/null
+++ b/config/win32/ftmodule.h
@@ -0,0 +1,3 @@
+FT_DRIVER(sfnt_driver_interface)
+FT_DRIVER(tt_driver_interface)
+FT_DRIVER(t1_driver_interface)