ref: e616d2252981296a0d1e671f7dd213f6b47dcec3
parent: d060a75b0d100780118cb2f0adc1bd0c6c016f17
author: Werner Lemberg <[email protected]>
date: Thu Jul 20 12:06:54 EDT 2000
Adding $(CFG) variable to pass configure script parameters. Fixing DLL version.
--- a/builds/unix/configure
+++ b/builds/unix/configure
@@ -534,7 +534,7 @@
-version_info='0:0:0'
+version_info='6:0:0'
ac_aux_dir=
--- a/builds/unix/configure.in
+++ b/builds/unix/configure.in
@@ -5,10 +5,10 @@
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
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -26,8 +26,11 @@
# 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 @@
setup: std_setup
unix.mk: builds/unix/unix.in
- cd builds/unix; ./configure
+ cd builds/unix; ./configure $(CFG)
endif # test Unix
endif # test PLATFORM
--- 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,12 +17,29 @@
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.
#
# Note that this is not $(TOP)/obj!
@@ -47,12 +64,12 @@
# 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 @@
# 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 @@
# 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 @@
# 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