* Makefile, *.mk: Use `?=' where appropriate.

* builds/detect.mk (TOP_DIR), builds/os2/os2-dev.mk (TOP_DIR),
builds/win32/w32-dev.mk (TOP_DIR): Removed.  Defined elsewhere.
This commit is contained in:
Werner Lemberg 2006-02-01 07:52:11 +00:00
parent 9a8006b18e
commit 8a4de0d669
22 changed files with 59 additions and 126 deletions

View File

@ -9,6 +9,11 @@
* builds/unix/install.mk (install): Fix path for ftmodule.h.
* Makefile, *.mk: Use `?=' where appropriate.
* builds/detect.mk (TOP_DIR), builds/os2/os2-dev.mk (TOP_DIR),
builds/win32/w32-dev.mk (TOP_DIR): Removed. Defined elsewhere.
2006-01-31 Werner Lemberg <wl@gnu.org>
Implement new, simplified module selection. With GNU make it is now

View File

@ -15,22 +15,18 @@
# Project names
#
PROJECT := freetype
PROJECT := freetype
PROJECT_TITLE := FreeType
# The variable TOP_DIR holds the path to the topmost directory in the project
# engine source hierarchy. If it is not defined, default it to `.'.
#
ifndef TOP_DIR
TOP_DIR := .
endif
TOP_DIR ?= .
# The variable OBJ_DIR gives the location where object files and the
# FreeType library are built.
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
OBJ_DIR ?= $(TOP_DIR)/objs
include $(TOP_DIR)/builds/toplevel.mk

View File

@ -63,9 +63,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c
endif
CFLAGS ?= -c
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -65,9 +65,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c
endif
CFLAGS ?= -c
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -62,9 +62,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c
endif
CFLAGS ?= -c
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -75,10 +73,8 @@ ANSIFLAGS :=
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -62,9 +62,7 @@ T := -o
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
endif
CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -73,10 +71,8 @@ ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -62,9 +62,7 @@ T := -o
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
endif
CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -73,10 +71,8 @@ ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 2003 by
# Copyright 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -61,9 +61,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
CFLAGS ?= -c -g -O6 -Wall
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -72,10 +70,8 @@ ANSIFLAGS :=
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2004, 2005 by
# Copyright 1996-2000, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -87,10 +87,8 @@ ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2005 by
# Copyright 1996-2000, 2003, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -61,9 +61,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
CFLAGS ?= -c -g -O6 -Wall
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -72,10 +70,8 @@ ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -69,9 +69,7 @@ T := /Fo
# _does_ compute an arithmetic value, so we disable this warning
# with "/Qwd32".
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /Qwd32
endif
CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -63,9 +63,7 @@ T := -o$(space)
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -g
endif
CFLAGS ?= -c -g
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -78,10 +76,8 @@ ANSIFLAGS := -A
# library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(PROJECT_LIBRARY)
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
CLEAN_LIBRARY ?= $(DELETE) $(PROJECT_LIBRARY)
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -60,9 +60,7 @@ T := /Fo
#
# These should concern: debug output, optimization & warnings.
#
ifndef CFLAGS
CFLAGS := /Q- /Gd+ /O2 /G5 /W3 /C
endif
CFLAGS ?= /Q- /Gd+ /O2 /G5 /W3 /C
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2005 by
# Copyright 1996-2000, 2003, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -66,9 +66,7 @@ TE := /Fe
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
endif
CFLAGS ?= /nologo /c /Ox /G5 /W3 /WX
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -63,9 +63,7 @@ T := -FO=
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -zq
endif
CFLAGS ?= -zq
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@ -74,12 +72,10 @@ ANSIFLAGS := -za
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
wlib -q -n $@; \
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
echo > nul)
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
wlib -q -n $@; \
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
echo > nul)
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003 by
# Copyright 1996-2000, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -63,9 +63,7 @@ T := -Fo
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
ifndef CFLAGS
CFLAGS := -c -g2 -O
endif
CFLAGS ?= -c -g2 -O
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#

View File

@ -38,12 +38,6 @@
# TOP_DIR The top-most directory in the FreeType library source
# hierarchy. If not defined, it will default to `.'.
# If TOP_DIR is not defined, default it to `.'
#
ifndef TOP_DIR
TOP_DIR := .
endif
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
#
PLATFORM := ansi

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2003, 2004 by
# Copyright 1996-2000, 2003, 2004, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -73,9 +73,7 @@ ifeq ($(PLATFORM),dos)
# Use DJGPP (i.e. gcc) by default.
#
CONFIG_FILE := dos-gcc.mk
ifndef CC
CC := gcc
endif
CC ?= gcc
# additionally, we provide hooks for various other compilers
#

View File

@ -105,9 +105,7 @@ CACHE_DIR := $(PUBLIC_DIR)/cache
# The documentation directory.
#
ifndef DOC_DIR
DOC_DIR := $(TOP_DIR)/docs/reference
endif
DOC_DIR ?= $(TOP_DIR)/docs/reference
# The final name of the library file.
#
@ -192,9 +190,7 @@ FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H) $(DEVEL_H)
# ftsystem component
#
ifndef FTSYS_SRC
FTSYS_SRC := $(BASE_DIR)/ftsystem.c
endif
FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
FTSYS_OBJ := $(OBJ_DIR)/ftsystem.$O
@ -206,9 +202,7 @@ $(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
# ftdebug component
#
ifndef FTDEBUG_SRC
FTDEBUG_SRC := $(BASE_DIR)/ftdebug.c
endif
FTDEBUG_SRC ?= $(BASE_DIR)/ftdebug.c
FTDEBUG_OBJ := $(OBJ_DIR)/ftdebug.$O

View File

@ -15,10 +15,6 @@
# fully.
ifndef TOP_DIR
TOP_DIR := .
endif
DEVEL_DIR := $(TOP_DIR)/devel
# include OS/2-specific definitions

View File

@ -58,9 +58,7 @@ endif
# FTMODULE_H, as its name suggests, indicates where the FreeType module
# classes resides.
#
ifndef FTMODULE_H
FTMODULE_H := $(OBJ_DIR)/ftmodule.h
endif
FTMODULE_H ?= $(OBJ_DIR)/ftmodule.h
include $(MODULES_CFG)
@ -74,9 +72,7 @@ MODULES := $(FONT_MODULES) \
$(AUX_MODULES)
ifndef CONFIG_MK
CONFIG_MK := config.mk
endif
CONFIG_MK ?= config.mk
# If no configuration sub-makefile is present, or if `setup' is the target
# to be built, run the auto-detection rules to figure out which

View File

@ -19,10 +19,6 @@
# Shell (_not_ Cygwin BASH)!
#
ifndef TOP_DIR
TOP_DIR := .
endif
DEVEL_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/win32/win32-def.mk