David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 1 | # |
| 2 | # FreeType 2 library sub-Makefile |
| 3 | # |
| 4 | |
| 5 | |
Werner Lemberg | 744dd45 | 2008-02-11 08:22:40 +0000 | [diff] [blame] | 6 | # Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 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 | # The following variables (set by other Makefile components, in the |
| 21 | # environment, or on the command line) are used: |
| 22 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 23 | # BUILD_DIR The architecture dependent directory, |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 24 | # e.g. `$(TOP_DIR)/builds/unix'. Added to INCLUDES also. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 25 | # |
| 26 | # OBJ_DIR The directory in which object files are created. |
| 27 | # |
| 28 | # LIB_DIR The directory in which the library is created. |
| 29 | # |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 30 | # DOC_DIR The directory in which the API reference is created. |
| 31 | # |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 32 | # INCLUDES A list of directories to be included additionally. |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 33 | # |
| 34 | # DEVEL_DIR Development directory which is added to the INCLUDES |
| 35 | # variable before the standard include directories. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 36 | # |
| 37 | # CFLAGS Compilation flags. This overrides the default settings |
| 38 | # in the platform-specific configuration files. |
| 39 | # |
| 40 | # FTSYS_SRC If set, its value is used as the name of a replacement |
| 41 | # file for `src/base/ftsystem.c'. |
| 42 | # |
| 43 | # FTDEBUG_SRC If set, its value is used as the name of a replacement |
| 44 | # file for `src/base/ftdebug.c'. [For a normal build, this |
| 45 | # file does nothing.] |
| 46 | # |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 47 | # FTMODULE_H The file which contains the list of module classes for |
| 48 | # the current build. Usually, this is automatically |
| 49 | # created by `modules.mk'. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 50 | # |
| 51 | # BASE_OBJ_S |
| 52 | # BASE_OBJ_M A list of base objects (for single object and multiple |
| 53 | # object builds, respectively). Set up in |
| 54 | # `src/base/rules.mk'. |
| 55 | # |
| 56 | # BASE_EXT_OBJ A list of base extension objects. Set up in |
| 57 | # `src/base/rules.mk'. |
| 58 | # |
| 59 | # DRV_OBJ_S |
| 60 | # DRV_OBJ_M A list of driver objects (for single object and multiple |
| 61 | # object builds, respectively). Set up cumulatively in |
| 62 | # `src/<driver>/rules.mk'. |
| 63 | # |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 64 | # CLEAN |
| 65 | # DISTCLEAN The sub-makefiles can append additional stuff to these two |
| 66 | # variables which is to be removed for the `clean' resp. |
| 67 | # `distclean' target. |
| 68 | # |
Werner Lemberg | 89df58f | 2002-06-14 08:09:25 +0000 | [diff] [blame] | 69 | # TOP_DIR, SEP, |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 70 | # COMPILER_SEP, |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 71 | # LIBRARY, CC, |
| 72 | # A, I, O, T Check `config.mk' for details. |
| 73 | |
| 74 | |
| 75 | # The targets `objects' and `library' are defined at the end of this |
| 76 | # Makefile after all other rules have been included. |
| 77 | # |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 78 | .PHONY: single multi objects library refdoc |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 79 | |
| 80 | # default target -- build single objects and library |
| 81 | # |
| 82 | single: objects library |
| 83 | |
| 84 | # `multi' target -- build multiple objects and library |
| 85 | # |
| 86 | multi: objects library |
| 87 | |
| 88 | |
| 89 | # The FreeType source directory, usually `./src'. |
| 90 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 91 | SRC_DIR := $(TOP_DIR)/src |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 92 | |
| 93 | # The directory where the base layer components are placed, usually |
| 94 | # `./src/base'. |
| 95 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 96 | BASE_DIR := $(SRC_DIR)/base |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 97 | |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 98 | # Other derived directories. |
David Turner | d3c8e06 | 2000-12-04 22:53:55 +0000 | [diff] [blame] | 99 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 100 | PUBLIC_DIR := $(TOP_DIR)/include/freetype |
| 101 | INTERNAL_DIR := $(PUBLIC_DIR)/internal |
Werner Lemberg | 104dd41 | 2003-09-16 07:57:25 +0000 | [diff] [blame] | 102 | SERVICES_DIR := $(INTERNAL_DIR)/services |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 103 | CONFIG_DIR := $(PUBLIC_DIR)/config |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 104 | |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 105 | # The documentation directory. |
| 106 | # |
Werner Lemberg | 8a4de0d | 2006-02-01 07:52:11 +0000 | [diff] [blame] | 107 | DOC_DIR ?= $(TOP_DIR)/docs/reference |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 108 | |
| 109 | # The final name of the library file. |
| 110 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 111 | PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 112 | |
| 113 | |
| 114 | # include paths |
| 115 | # |
| 116 | # IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 117 | # before the standard include list. Porters are then able to |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 118 | # put their own version of some of the FreeType components |
David Turner | a90663f | 2000-07-08 00:41:13 +0000 | [diff] [blame] | 119 | # in the `freetype/builds/<system>' directory, as these |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 120 | # files will override the default sources. |
| 121 | # |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 122 | INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ |
| 123 | $(DEVEL_DIR) \ |
| 124 | $(BUILD_DIR) \ |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 125 | $(TOP_DIR)/include) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 126 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 127 | INCLUDE_FLAGS := $(INCLUDES:%=$I%) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 128 | |
| 129 | |
| 130 | # C flags used for the compilation of an object file. This must include at |
David Turner | a90663f | 2000-07-08 00:41:13 +0000 | [diff] [blame] | 131 | # least the paths for the `base' and `builds/<system>' directories; |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 132 | # debug/optimization/warning flags + ansi compliance if needed. |
| 133 | # |
Werner Lemberg | b5349a9 | 2002-02-19 16:30:15 +0000 | [diff] [blame] | 134 | # $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with |
| 135 | # old FreeType versions. |
| 136 | # |
Werner Lemberg | be3c981 | 2006-01-27 14:16:16 +0000 | [diff] [blame] | 137 | # Note what we also define the macro FT2_BUILD_LIBRARY when building |
| 138 | # FreeType. This is required to let our sources include the internal |
| 139 | # headers (something forbidden by clients). |
David Turner | ff0e9e6 | 2006-01-27 09:15:53 +0000 | [diff] [blame] | 140 | # |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 141 | # Finally, we define FT_CONFIG_MODULES_H so that the compiler uses the |
| 142 | # generated version of `ftmodule.h' in $(OBJ_DIR). If there is an |
| 143 | # `ftoption.h' files in $(OBJ_DIR), define FT_CONFIG_OPTIONS_H too. |
| 144 | # |
| 145 | ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),) |
| 146 | FTOPTION_H := $(OBJ_DIR)/ftoption.h |
| 147 | FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>" |
| 148 | endif |
| 149 | |
| 150 | FT_CFLAGS = $(CPPFLAGS) \ |
| 151 | $(INCLUDE_FLAGS) \ |
| 152 | $(CFLAGS) \ |
| 153 | $DFT2_BUILD_LIBRARY \ |
| 154 | $DFT_CONFIG_MODULES_H="<ftmodule.h>" \ |
| 155 | $(FTOPTION_FLAG) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 156 | FT_CC = $(CC) $(FT_CFLAGS) |
| 157 | FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS) |
| 158 | |
| 159 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 160 | # Include the `exports' rules file. |
David Turner | 9fbd2ab | 2005-10-28 16:14:14 +0000 | [diff] [blame] | 161 | # |
| 162 | include $(TOP_DIR)/builds/exports.mk |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 163 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 164 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 165 | # Initialize the list of objects. |
| 166 | # |
| 167 | OBJECTS_LIST := |
| 168 | |
| 169 | |
| 170 | # Define $(PUBLIC_H) as the list of all public header files located in |
Werner Lemberg | 89a1a51 | 2008-10-02 06:48:10 +0000 | [diff] [blame] | 171 | # `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined |
Werner Lemberg | 5a73d8d | 2006-03-20 16:55:32 +0000 | [diff] [blame] | 172 | # similarly. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 173 | # |
| 174 | # This is used to simplify the dependency rules -- if one of these files |
| 175 | # changes, the whole library is recompiled. |
| 176 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 177 | PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h) |
Werner Lemberg | 89a1a51 | 2008-10-02 06:48:10 +0000 | [diff] [blame] | 178 | INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \ |
Werner Lemberg | 104dd41 | 2003-09-16 07:57:25 +0000 | [diff] [blame] | 179 | $(wildcard $(SERVICES_DIR)/*.h) |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 180 | CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \ |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 181 | $(wildcard $(BUILD_DIR)/freetype/config/*.h) \ |
| 182 | $(FTMODULE_H) \ |
| 183 | $(FTOPTION_H) |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 184 | DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 185 | |
Werner Lemberg | 89a1a51 | 2008-10-02 06:48:10 +0000 | [diff] [blame] | 186 | FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 187 | |
| 188 | |
| 189 | # ftsystem component |
| 190 | # |
Werner Lemberg | 8a4de0d | 2006-02-01 07:52:11 +0000 | [diff] [blame] | 191 | FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 192 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 193 | FTSYS_OBJ := $(OBJ_DIR)/ftsystem.$O |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 194 | |
| 195 | OBJECTS_LIST += $(FTSYS_OBJ) |
| 196 | |
| 197 | $(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H) |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 198 | $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 199 | |
| 200 | |
| 201 | # ftdebug component |
| 202 | # |
Werner Lemberg | 8a4de0d | 2006-02-01 07:52:11 +0000 | [diff] [blame] | 203 | FTDEBUG_SRC ?= $(BASE_DIR)/ftdebug.c |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 204 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 205 | FTDEBUG_OBJ := $(OBJ_DIR)/ftdebug.$O |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 206 | |
| 207 | OBJECTS_LIST += $(FTDEBUG_OBJ) |
| 208 | |
| 209 | $(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H) |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 210 | $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 211 | |
| 212 | |
| 213 | # Include all rule files from FreeType components. |
| 214 | # |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 215 | include $(SRC_DIR)/base/rules.mk |
| 216 | include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES)) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 217 | |
| 218 | |
| 219 | # ftinit component |
| 220 | # |
| 221 | # The C source `ftinit.c' contains the FreeType initialization routines. |
| 222 | # It is able to automatically register one or more drivers when the API |
| 223 | # function FT_Init_FreeType() is called. |
| 224 | # |
| 225 | # The set of initial drivers is determined by the driver Makefiles |
| 226 | # includes above. Each driver Makefile updates the FTINIT_xxx lists |
| 227 | # which contain additional include paths and macros used to compile the |
| 228 | # single `ftinit.c' source. |
| 229 | # |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 230 | FTINIT_SRC := $(BASE_DIR)/ftinit.c |
| 231 | FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 232 | |
| 233 | OBJECTS_LIST += $(FTINIT_OBJ) |
| 234 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 235 | $(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H) |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 236 | $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 237 | |
| 238 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 239 | # All FreeType library objects. |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 240 | # |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 241 | OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) |
| 242 | OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 243 | |
| 244 | |
| 245 | # The target `multi' on the Make command line indicates that we want to |
| 246 | # compile each source file independently. |
| 247 | # |
| 248 | # Otherwise, each module/driver is compiled in a single object file through |
| 249 | # source file inclusion (see `src/base/ftbase.c' or |
| 250 | # `src/truetype/truetype.c' for examples). |
| 251 | # |
| 252 | BASE_OBJECTS := $(OBJECTS_LIST) |
| 253 | |
| 254 | ifneq ($(findstring multi,$(MAKECMDGOALS)),) |
| 255 | OBJECTS_LIST += $(OBJ_M) |
| 256 | else |
| 257 | OBJECTS_LIST += $(OBJ_S) |
| 258 | endif |
| 259 | |
| 260 | objects: $(OBJECTS_LIST) |
| 261 | |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 262 | library: $(PROJECT_LIBRARY) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 263 | |
David Turner | 9fbd2ab | 2005-10-28 16:14:14 +0000 | [diff] [blame] | 264 | dll: $(PROJECT_LIBRARY) exported_symbols |
| 265 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 266 | .c.$O: |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 267 | $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 268 | |
| 269 | |
Werner Lemberg | b26b314 | 2006-12-09 20:01:43 +0000 | [diff] [blame] | 270 | ifneq ($(findstring refdoc,$(MAKECMDGOALS)),) |
| 271 | # poor man's `sed' emulation with make's built-in string functions |
| 272 | work := $(strip $(shell $(CAT) $(PUBLIC_DIR)/freetype.h)) |
| 273 | work := $(subst |,x,$(work)) |
| 274 | work := $(subst $(space),|,$(work)) |
| 275 | work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work)) |
| 276 | work := $(word 2,$(work)) |
| 277 | major := $(subst |,$(space),$(work)) |
| 278 | major := $(firstword $(major)) |
| 279 | |
| 280 | work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work)) |
| 281 | work := $(word 2,$(work)) |
| 282 | minor := $(subst |,$(space),$(work)) |
| 283 | minor := $(firstword $(minor)) |
| 284 | |
| 285 | work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work)) |
| 286 | work := $(word 2,$(work)) |
| 287 | patch := $(subst |,$(space),$(work)) |
| 288 | patch := $(firstword $(patch)) |
| 289 | |
| 290 | version := $(major).$(minor).$(patch) |
| 291 | endif |
| 292 | |
Werner Lemberg | e0d1559 | 2006-05-10 13:44:47 +0000 | [diff] [blame] | 293 | # We write-protect the docmaker directory to suppress generation |
| 294 | # of .pyc files. |
| 295 | # |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 296 | refdoc: |
Werner Lemberg | e0d1559 | 2006-05-10 13:44:47 +0000 | [diff] [blame] | 297 | -chmod -w $(SRC_DIR)/tools/docmaker |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 298 | python $(SRC_DIR)/tools/docmaker/docmaker.py \ |
| 299 | --prefix=ft2 \ |
Werner Lemberg | b26b314 | 2006-12-09 20:01:43 +0000 | [diff] [blame] | 300 | --title=FreeType-$(version) \ |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 301 | --output=$(DOC_DIR) \ |
| 302 | $(PUBLIC_DIR)/*.h \ |
| 303 | $(PUBLIC_DIR)/config/*.h \ |
| 304 | $(PUBLIC_DIR)/cache/*.h |
Werner Lemberg | e0d1559 | 2006-05-10 13:44:47 +0000 | [diff] [blame] | 305 | -chmod +w $(SRC_DIR)/tools/docmaker |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 306 | |
| 307 | |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 308 | .PHONY: clean_project_std distclean_project_std |
| 309 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 310 | # Standard cleaning and distclean rules. These are not accepted |
| 311 | # on all systems though. |
| 312 | # |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 313 | clean_project_std: |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 314 | -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 315 | |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 316 | distclean_project_std: clean_project_std |
| 317 | -$(DELETE) $(PROJECT_LIBRARY) |
Werner Lemberg | d060a75 | 2000-07-20 06:57:41 +0000 | [diff] [blame] | 318 | -$(DELETE) *.orig *~ core *.core $(DISTCLEAN) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 319 | |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 320 | |
| 321 | .PHONY: clean_project_dos distclean_project_dos |
| 322 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 323 | # The Dos command shell does not support very long list of arguments, so |
| 324 | # we are stuck with wildcards. |
| 325 | # |
Werner Lemberg | 948ee80 | 2002-05-02 06:50:58 +0000 | [diff] [blame] | 326 | # Don't break the command lines with \; this prevents the "del" command from |
Werner Lemberg | a64c55b | 2001-05-12 06:40:50 +0000 | [diff] [blame] | 327 | # working correctly on Win9x. |
David Turner | ebe85f5 | 2001-05-11 14:25:57 +0000 | [diff] [blame] | 328 | # |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 329 | clean_project_dos: |
Werner Lemberg | 744dd45 | 2008-02-11 08:22:40 +0000 | [diff] [blame] | 330 | -$(DELETE) $(subst /,$(SEP),$(OBJ_DIR)/*.$O $(CLEAN) $(NO_OUTPUT)) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 331 | |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 332 | distclean_project_dos: clean_project_dos |
Werner Lemberg | 744dd45 | 2008-02-11 08:22:40 +0000 | [diff] [blame] | 333 | -$(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT)) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 334 | |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 335 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 336 | .PHONY: remove_config_mk remove_ftmodule_h |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 337 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 338 | # Remove configuration file (used for distclean). |
| 339 | # |
| 340 | remove_config_mk: |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 341 | -$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT)) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 342 | |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 343 | # Remove module list (used for distclean). |
| 344 | # |
| 345 | remove_ftmodule_h: |
| 346 | -$(DELETE) $(subst /,$(SEP),$(FTMODULE_H) $(NO_OUTPUT)) |
| 347 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 348 | |
Werner Lemberg | 594f0c9 | 2000-12-20 22:09:41 +0000 | [diff] [blame] | 349 | .PHONY: clean distclean |
| 350 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 351 | # The `config.mk' file must define `clean_freetype' and |
| 352 | # `distclean_freetype'. Implementations may use to relay these to either |
| 353 | # the `std' or `dos' versions from above, or simply provide their own |
| 354 | # implementation. |
| 355 | # |
David Turner | 046f7a0 | 2000-09-15 22:42:06 +0000 | [diff] [blame] | 356 | clean: clean_project |
Werner Lemberg | 5993924 | 2006-01-31 20:17:42 +0000 | [diff] [blame] | 357 | distclean: distclean_project remove_config_mk remove_ftmodule_h |
Werner Lemberg | 6aa35cd | 2003-07-09 15:20:32 +0000 | [diff] [blame] | 358 | -$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT)) |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 359 | |
Werner Lemberg | 858f310 | 2003-06-09 04:46:30 +0000 | [diff] [blame] | 360 | |
David Turner | 7404301 | 2000-07-08 00:22:20 +0000 | [diff] [blame] | 361 | # EOF |