2 # FreeType 2 Configuration rules for Win32 + GCC
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
15 # NOTE: This version requires that GNU Make is invoked from the Windows
16 # Shell (_not_ Cygwin BASH)!
25 HOSTSEP := $(strip \ )
26 BUILD := $(TOP)/builds/win32
30 # The directory where all object files are placed.
32 # Note that this is not $(TOP)/obj!
33 # This lets you build the library in your own directory with something like
35 # set TOP=.../path/to/freetype2/top/dir...
37 # make -f %TOP%/Makefile setup [options]
38 # make -f %TOP%/Makefile
43 # The directory where all library files are placed.
45 # By default, this is the same as $(OBJ_DIR), however, this can be changed
46 # to suit particular needs.
51 # The object file extension (for standard and static libraries). This can be
52 # .o, .tco, .obj, etc., depending on the platform.
57 # The library file extension (for standard and static libraries). This can
58 # be .a, .lib, etc., depending on the platform.
64 # The name of the final library file. Note that the DOS-specific Makefile
65 # uses a shorter (8.3) name.
67 LIBRARY := libfreetype
70 # Path inclusion flag. Some compilers use a different flag than `-I' to
71 # specify an additional include path. Examples are `/i=' or `-J'.
76 # C flag used to define a macro before the compilation of a given source
77 # object. Usually is `-D' like in `-DDEBUG'.
82 # The link flag used to specify a given library file on link. Note that
83 # this is only used to compile the demo programs, not the library itself.
90 T := -o # Don't remove this comment line! We need the space after `-o'.
95 # These should concern: debug output, optimization & warnings.
97 # Use the ANSIFLAGS variable to define the compiler flags used to enfore
101 CFLAGS := -c -g -O6 -Wall
104 # ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
106 ANSIFLAGS := -ansi -pedantic
111 # Now include the main sub-makefile. It contains all the rules used to
112 # build the library with the previous variables defined.
114 include $(TOP)/builds/freetype.mk
116 # The cleanup targets.
118 clean_freetype: clean_freetype_dos
119 distclean_freetype: distclean_freetype_dos
121 # Librarian to use to build the static library
123 FT_LIBRARIAN := $(AR) -r
126 # This final rule is used to link all object files into a single library.
127 # It is part of the system-specific sub-Makefile because not all
128 # librarians accept a simple syntax like
130 # librarian library_file {list of object files}
132 $(FT_LIBRARY): $(OBJECTS_LIST)
133 -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
134 $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)