2 # FreeType 2 configuration rules templates for Unix + configure
6 # Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013 by
7 # David Turner, Robert Wilhelm, and Werner Lemberg.
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
17 TOP_DIR := $(shell cd $(TOP_DIR); pwd)
24 # this is used for `make distclean' and `make install'
25 OBJ_BUILD ?= $(BUILD_DIR)
27 # don't use `:=' here since the path stuff will be included after this file
29 FTSYS_SRC = @FTSYS_SRC@
32 INSTALL_DATA := @INSTALL_DATA@
33 INSTALL_PROGRAM := @INSTALL_PROGRAM@
34 INSTALL_SCRIPT := @INSTALL_SCRIPT@
35 MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs
37 DISTCLEAN += $(OBJ_BUILD)/config.cache \
38 $(OBJ_BUILD)/config.log \
39 $(OBJ_BUILD)/config.status \
40 $(OBJ_BUILD)/unix-def.mk \
41 $(OBJ_BUILD)/unix-cc.mk \
42 $(OBJ_BUILD)/ftconfig.h \
43 $(OBJ_BUILD)/freetype-config \
44 $(OBJ_BUILD)/freetype2.pc \
49 # Standard installation variables.
52 exec_prefix := @exec_prefix@
55 includedir := @includedir@
56 datarootdir := @datarootdir@
59 version_info := @version_info@
61 # Variables needed for `freetype-config' and `freetype.pc'.
63 FT2_EXTRA_LIBS := @FT2_EXTRA_LIBS@
66 build_libtool_libs := @build_libtool_libs@
67 ft_version := @ft_version@
69 # The directory where all library files are placed.
71 # By default, this is the same as $(OBJ_DIR); however, this can be changed
72 # to suit particular needs.
76 # The BASE_SRC macro lists all source files that should be included in
77 # src/base/ftbase.c. When configure sets up CFLAGS to build ftmac.c,
78 # ftmac.c should be added to BASE_SRC.
81 # The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
82 # with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
83 # ftgzip module is not compiled in.
84 SYSTEM_ZLIB := @SYSTEM_ZLIB@
87 # The NO_OUTPUT macro is appended to command lines in order to ignore
88 # the output of some programs.
90 NO_OUTPUT := 2> /dev/null
93 # To support calls like
95 # configure --includedir='${libdir}'/freetype2/include
97 # we generate `freetype-config' and `freetype.pc' at compile time so that
98 # those variables are properly expanded.
100 $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
102 sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
103 -e 's|%LIBBZ2%|$(LIBBZ2)|' \
104 -e 's|%LIBZ%|$(LIBZ)|' \
105 -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
106 -e 's|%exec_prefix%|$(exec_prefix)|' \
107 -e 's|%ft_version%|$(ft_version)|' \
108 -e 's|%includedir%|$(includedir)|' \
109 -e 's|%libdir%|$(libdir)|' \
110 -e 's|%prefix%|$(prefix)|' \
117 $(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
119 sed -e 's|%FT2_EXTRA_LIBS%|$(FT2_EXTRA_LIBS)|' \
120 -e 's|%LIBBZ2%|$(LIBBZ2)|' \
121 -e 's|%LIBZ%|$(LIBZ)|' \
122 -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \
123 -e 's|%exec_prefix%|$(exec_prefix)|' \
124 -e 's|%ft_version%|$(ft_version)|' \
125 -e 's|%includedir%|$(includedir)|' \
126 -e 's|%libdir%|$(libdir)|' \
127 -e 's|%prefix%|$(prefix)|' \
134 all: $(OBJ_BUILD)/freetype-config \
135 $(OBJ_BUILD)/freetype2.pc