For Unix platforms, `configure' will be always called now. The `devel' target no longer needs unix-dev.mk. Some other minor fixes.
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 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk
index 8271bea..dec1baa 100644
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -22,50 +22,36 @@ ifeq ($(PLATFORM),ansi)
COPY := cp
DELETE := rm -f
- # Test whether we are using gcc. If so, we select the `unix-gcc.mk'
- # configuration file. Otherwise, the configure script is called and
+ # If a Unix platform is detected, the configure script is called and
# `unix.mk' is created.
#
- # The use of the configure script can be forced by saying `make unix';
- # arguments to `configure' should be in the CFG variable. Example:
+ # Arguments to `configure' should be in the CFG variable. Example:
#
- # make unix CFG="--prefix=/usr --disable-static"
+ # make CFG="--prefix=/usr --disable-static"
+ #
+ # If you need to set CFLAGS or LDFLAGS, do it here also.
#
# Feel free to add support for other platform specific compilers in this
# directory (e.g. solaris.mk + changes here to detect the platform).
#
- ifneq ($(findstring unix,$(MAKECMDGOALS)),)
- CONFIG_FILE := unix.mk
- setup: unix.mk
- unix: setup
- else
- ifeq ($(firstword $(CC)),gcc)
- is_gcc := 1
- else
- ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
- is_gcc := 1
- endif
- endif
+ CONFIG_FILE := unix.mk
+ setup: unix.mk
+ unix: setup
- ifdef is_gcc
- CONFIG_FILE := unix-gcc.mk
- else
- CONFIG_FILE := unix.mk
- setup: unix.mk
- endif
-
- # If `devel' is the requested target, use the development Makefile.
- #
- ifneq ($(findstring devel,$(MAKECMDGOALS)),)
- CONFIG_FILE := unix-dev.mk
- devel: setup
+ # If `devel' is the requested target, use `-g -O0' as the default value
+ # for CFLAGS if CFLAGS isn't set.
+ #
+ ifneq ($(findstring devel,$(MAKECMDGOALS)),)
+ ifndef CFLAGS
+ USE_CFLAGS := CFLAGS="-g -O0"
endif
+ devel: setup
endif
setup: std_setup
unix.mk: builds/unix/unix.in
- cd builds/unix; ./configure $(CFG)
+ cd builds/unix; $(USE_CFLAGS) ./configure $(CFG)
endif # test Unix
endif # test PLATFORM
diff --git a/builds/unix/unix-dev.mk b/builds/unix/unix-dev.mk
deleted file mode 100644
index 5cd5beb..0000000
--- a/builds/unix/unix-dev.mk
+++ /dev/null
@@ -1,134 +0,0 @@
-#
-# FreeType 2 configuration rules for the gcc compiler under UNIX
-#
-# Development version without optimizations.
-#
-
-
-# Copyright 1996-2000 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.
-
-
-ifndef TOP
- TOP := .
-endif
-
-DELETE := rm -f
-SEP := /
-HOSTSEP := $(SEP)
-BUILD := $(TOP)/builds/unix
-PLATFORM := unix
-
-# The directory where all object files are placed.
-#
-# Note that this is not $(TOP)/obj!
-# This lets you build the library in your own directory with something like
-#
-# set TOP=.../path/to/freetype2/top/dir...
-# mkdir obj
-# make -f $TOP/Makefile setup [options]
-# make -f $TOP/Makefile
-#
-OBJ_DIR := obj
-
-
-# The directory where all library files are placed.
-#
-# By default, this is the same as $(OBJ_DIR), however, this can be changed
-# to suit particular needs.
-#
-LIB_DIR := $(OBJ_DIR)
-
-
-# The object file extension. This can be .o, .tco, .obj, etc., depending on
-# the platform.
-#
-O := o
-
-# The library file extension. This can be .a, .lib, etc., depending on the
-# platform.
-#
-A := a
-
-
-# The name of the final library file. Note that the DOS-specific Makefile
-# uses a shorter (8.3) name.
-#
-LIBRARY := libfreetype
-
-
-# Path inclusion flag. Some compilers use a different flag than `-I' to
-# specify an additional include path. Examples are `/i=' or `-J'.
-#
-I := -I
-
-
-# C flag used to define a macro before the compilation of a given source
-# object. Usually is `-D' like in `-DDEBUG'.
-#
-D := -D
-
-
-# The link flag used to specify a given library file on link. Note that
-# this is only used to compile the demo programs, not the library itself.
-#
-L := -l
-
-
-# Target flag.
-#
-T := -o # Don't remove this comment line! We need the space after `-o'.
-
-
-# C flags
-#
-# These should concern: debug output, optimization & warnings.
-#
-# Use the ANSIFLAGS variable to define the compiler flags used to enfore
-# ANSI compliance.
-#
-ifndef CFLAGS
- CFLAGS := -c -g -O0 -Wall
-endif
-
-# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
-#
-ANSIFLAGS := -ansi -pedantic
-
-
-ifdef BUILD_FREETYPE
-
- # Now include the main sub-makefile. It contains all the rules used to
- # build the library with the previous variables defined.
- #
- include $(TOP)/builds/freetype.mk
-
- # The cleanup targets.
- #
- clean_freetype: clean_freetype_std
- distclean_freetype: distclean_freetype_std
-
- # Librarian to use to build the static library
- #
- FT_LIBRARIAN := $(AR) -r
-
-
- # This final rule is used to link all object files into a single library.
- # It is part of the system-specific sub-Makefile because not all
- # librarians accept a simple syntax like:
- #
- # librarian library_file {list of object files}
- #
- $(FT_LIBRARY): $(OBJECTS_LIST)
- -$(DELETE) $@
- $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
-
-endif
-
-# EOF
diff --git a/builds/unix/unix.in b/builds/unix/unix.in
index 115d786..9b874c2 100644
--- a/builds/unix/unix.in
+++ b/builds/unix/unix.in
@@ -108,9 +108,7 @@ T := -o # Don't remove this comment line! We need the space after `-o'.
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
-ifndef CFLAGS
- CFLAGS := -c @CFLAGS@ @XX_CFLAGS@
-endif
+CFLAGS := -c @XX_CFLAGS@ @CFLAGS@
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@@ -119,7 +117,13 @@ ANSIFLAGS := @XX_ANSIFLAGS@
# C compiler to use -- we use libtool!
#
#
-CC := $(BUILD)/libtool --mode=compile $(CC)
+CCraw := $(CC)
+CC := $(BUILD)/libtool --mode=compile $(CCraw)
+
+# linker flags
+#
+LDFLAGS := @LDFLAGS@
+
ifdef BUILD_FREETYPE
@@ -147,7 +151,7 @@ ifdef BUILD_FREETYPE
# Librarian to use to build the static library
#
- FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CC)
+ FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CCraw)
# This final rule is used to link all object files into a single library.