2 # FreeType 2 configuration rules templates for Unix + configure
6 # Copyright 1996-2000 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
24 BUILD := $(TOP)/builds/unix
29 INSTALL_DATA := @INSTALL_DATA@
30 MKINSTALLDIRS := $(BUILD)/mkinstalldirs
32 LIBTOOL := $(BUILD)/libtool
35 # don't use `:=' here since the path stuff will be included after this file
37 FTSYS_SRC = @FTSYS_SRC@
39 DISTCLEAN += $(BUILD)/config.cache \
41 $(BUILD)/config.status \
47 # Standard installation variables.
50 exec_prefix := @exec_prefix@
53 includedir := @includedir@
55 version_info := @version_info@
58 # The directory where all object files are placed.
60 # Note that this is not $(TOP)/obj!
61 # This lets you build the library in your own directory with something like
63 # set TOP=.../path/to/freetype2/top/dir...
65 # make -f $TOP/Makefile setup [options]
66 # make -f $TOP/Makefile
71 # The directory where all library files are placed.
73 # By default, this is the same as $(OBJ_DIR), however, this can be changed
74 # to suit particular needs.
79 # The object file extension (for standard and static libraries). This can be
80 # .o, .tco, .obj, etc., depending on the platform.
85 # The library file extension (for standard and static libraries). This can
86 # be .a, .lib, etc., depending on the platform.
92 # The name of the final library file. Note that the DOS-specific Makefile
93 # uses a shorter (8.3) name.
95 LIBRARY := libfreetype
98 # Path inclusion flag. Some compilers use a different flag than `-I' to
99 # specify an additional include path. Examples are `/i=' or `-J'.
104 # C flag used to define a macro before the compilation of a given source
105 # object. Usually is `-D' like in `-DDEBUG'.
110 # The link flag used to specify a given library file on link. Note that
111 # this is only used to compile the demo programs, not the library itself.
118 T := -o # Don't remove this comment line! We need the space after `-o'.
123 # These should concern: debug output, optimization & warnings.
125 # Use the ANSIFLAGS variable to define the compiler flags used to enfore
128 CFLAGS := -c @XX_CFLAGS@ @CFLAGS@
130 # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
132 ANSIFLAGS := @XX_ANSIFLAGS@
134 # C compiler to use -- we use libtool!
138 CC := $(LIBTOOL) --mode=compile $(CCraw)
147 # Now include the main sub-makefile. It contains all the rules used to
148 # build the library with the previous variables defined.
150 include $(TOP)/builds/freetype.mk
153 # The cleanup targets.
155 clean_freetype: clean_freetype_unix
156 distclean_freetype: distclean_freetype_unix
159 # Unix installation and deinstallation targets.
160 install: $(FT_LIBRARY)
161 $(MKINSTALLDIRS) $(libdir) \
162 $(includedir)/freetype/config \
163 $(includedir)/freetype/internal
164 $(LIBTOOL) --mode=install $(INSTALL) $(FT_LIBRARY) $(libdir)
165 -for P in $(PUBLIC_H) ; do \
166 $(INSTALL_DATA) $$P $(includedir)/freetype ; \
168 -for P in $(BASE_H) ; do \
169 $(INSTALL_DATA) $$P $(includedir)/freetype/internal ; \
171 -for P in $(CONFIG_H) ; do \
172 $(INSTALL_DATA) $$P $(includedir)/freetype/config ; \
176 -$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/$(LIBRARY).$A
177 -$(DELETE) $(includedir)/freetype/config/*
178 -$(DELDIR) $(includedir)/freetype/config
179 -$(DELETE) $(includedir)/freetype/internal/*
180 -$(DELDIR) $(includedir)/freetype/internal
181 -$(DELETE) $(includedir)/freetype/*
182 -$(DELDIR) $(includedir)/freetype
185 # Unix cleaning and distclean rules.
188 -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
189 -$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
192 distclean_freetype_unix: clean_freetype_unix
193 -$(DELETE) $(FT_LIBRARY)
194 -$(DELETE) $(OBJ_DIR)/.libs/*
195 -$(DELDIR) $(OBJ_DIR)/.libs
196 -$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
199 # Librarian to use to build the library
201 FT_LIBRARIAN := $(LIBTOOL) --mode=link $(CCraw)
204 # This final rule is used to link all object files into a single library.
205 # It is part of the system-specific sub-Makefile because not all
206 # librarians accept a simple syntax like
208 # librarian library_file {list of object files}
210 $(FT_LIBRARY): $(OBJECTS_LIST)
211 $(FT_LIBRARIAN) -o $@ $(OBJECTS_LIST) \
212 -rpath $(libdir) -version-info $(version_info)