Adding $(CFG) variable to pass configure script parameters. Fixing DLL version.
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
diff --git a/builds/unix/configure b/builds/unix/configure
index 33133d2..78e572b 100644
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -534,7 +534,7 @@ fi
-version_info='0:0:0'
+version_info='6:0:0'
ac_aux_dir=
diff --git a/builds/unix/configure.in b/builds/unix/configure.in
index f05d913..cfaf1b7 100644
--- a/builds/unix/configure.in
+++ b/builds/unix/configure.in
@@ -5,10 +5,10 @@ dnl
AC_INIT(ftconfig.in)
-dnl Configuration file - stay in 8.3 limit
+dnl Configuration file -- stay in 8.3 limit
AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
-version_info='0:0:0'
+version_info='6:0:0'
AC_SUBST(version_info)
dnl checks for system type
diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk
index 826974c..8271bea 100644
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -26,7 +26,10 @@ ifeq ($(PLATFORM),ansi)
# configuration file. Otherwise, the configure script is called and
# `unix.mk' is created.
#
- # The use of the configure script can be forced by saying `make unix'.
+ # The use of the configure script can be forced by saying `make unix';
+ # arguments to `configure' should be in the CFG variable. Example:
+ #
+ # make unix CFG="--prefix=/usr --disable-static"
#
# Feel free to add support for other platform specific compilers in this
# directory (e.g. solaris.mk + changes here to detect the platform).
@@ -62,7 +65,7 @@ ifeq ($(PLATFORM),ansi)
setup: std_setup
unix.mk: builds/unix/unix.in
- cd builds/unix; ./configure
+ cd builds/unix; ./configure $(CFG)
endif # test Unix
endif # test PLATFORM
diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk
index 9fec19b..7995709 100644
--- a/builds/unix/unix.mk
+++ b/builds/unix/unix.mk
@@ -1,5 +1,5 @@
#
-# FreeType 2 configuration rules for a standard Unix compiler
+# FreeType 2 configuration rules templates for Unix + configure
#
@@ -17,11 +17,28 @@ ifndef TOP
TOP := .
endif
-DELETE := rm -f
-SEP := /
-HOSTSEP := $(SEP)
-BUILD := $(TOP)/builds/unix
-PLATFORM := unix
+DELETE := rm -f
+DELDIR := rmdir
+SEP := /
+HOSTSEP := $(SEP)
+BUILD := $(TOP)/builds/unix
+PLATFORM := unix
+
+FTSYS_SRC := $(BUILD)/ftsystem.c
+
+DISTCLEAN += $(BUILD)/config.cache \
+ $(BUILD)/config.log \
+ $(BUILD)/config.status \
+ $(BUILD)/unix.mk \
+ $(BUILD)/ftconfig.h \
+ $(BUILD)/libtool
+
+
+prefix := /usr/local
+exec_prefix := ${prefix}
+libdir := ${exec_prefix}/lib
+version_info := 6:0:0
+
# The directory where all object files are placed.
#
@@ -47,12 +64,12 @@ LIB_DIR := $(OBJ_DIR)
# The object file extension. This can be .o, .tco, .obj, etc., depending on
# the platform.
#
-O := o
+O := lo
# The library file extension. This can be .a, .lib, etc., depending on the
# platform.
#
-A := a
+A := la
# The name of the final library file. Note that the DOS-specific Makefile
@@ -92,13 +109,17 @@ T := -o # Don't remove this comment line! We need the space after `-o'.
# ANSI compliance.
#
ifndef CFLAGS
- CFLAGS := -c
+ CFLAGS := -c -g -O2 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
-ANSIFLAGS :=
+ANSIFLAGS := -pedantic -ansi
+# C compiler to use -- we use libtool!
+#
+#
+CC := $(BUILD)/libtool --mode=compile $(CC)
ifdef BUILD_FREETYPE
@@ -109,12 +130,24 @@ ifdef BUILD_FREETYPE
# The cleanup targets.
#
- clean_freetype: clean_freetype_std
- distclean_freetype: distclean_freetype_std
+ clean_freetype: clean_freetype_unix
+ distclean_freetype: distclean_freetype_unix
+
+ # Unix cleaning and distclean rules.
+ #
+ clean_freetype_unix:
+ -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
+ -$(DELETE) $(OBJ_DIR)/*.o $(CLEAN)
+
+ distclean_freetype_unix: clean_freetype_unix
+ -$(DELETE) $(FT_LIBRARY)
+ -$(DELETE) $(OBJ_DIR)/.libs/*
+ -$(DELDIR) $(OBJ_DIR)/.libs
+ -$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# Librarian to use to build the static library
#
- FT_LIBRARIAN := $(AR) -r
+ FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CC)
# This final rule is used to link all object files into a single library.
@@ -124,8 +157,8 @@ ifdef BUILD_FREETYPE
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
- -$(DELETE) $@
- $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
+ $(FT_LIBRARIAN) -o $@ $(OBJECTS_LIST) \
+ -rpath $(libdir) -version-info $(version_info)
endif