Important changes were performed to clean up the makefiles,

these will be detailed later in a document (the work is not
completely finished).
This commit is contained in:
David Turner 2000-01-17 11:20:26 +00:00
parent 5ce5884d59
commit 281f9f6a13
13 changed files with 279 additions and 73 deletions

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
HOSTSEP := $(SEP)
BUILD := $(TOP)/config/ansi
PLATFORM := ansi
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS :=
# Now include the main sub-makefile. It contains all the rules used
# to build the library with the previous variables defined
#
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_std
distclean_freetype: clean_freetype_library_std
# Librarian to use to build the static library
#

View File

@ -123,5 +123,5 @@ dos_setup:
@echo ÿ
@echo Otherwise, simple type 'make' again to build the library
@echo ÿ
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK) > nul
@$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/dos
PLATFORM := dos
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -154,10 +168,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# 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

View File

@ -84,7 +84,7 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
#
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(FT_CC)
FT_COMPILE = $(CC) $(ANSI_FLAGS) $(FT_CFLAGS)
#
@ -160,10 +160,10 @@ $(FTINIT_OBJ): $(FTINIT_SRC) $(BASE_H) $(FTINIT_DRIVER_H) $(FT_MODULE_LIST)
# ommitted on builds which do not want them.
#
OBJ_M = $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M) \
$(FTSYS_OBJ) $(FTINIT_OBJ) $(FTDEBUG_OBJ)
$(FTINIT_OBJ)
OBJ_S = $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S) \
$(FTSYS_OBJ) $(FTINIT_OBJ) $(FTDEBUG_OBJ)
$(FTINIT_OBJ)
ifneq ($(findstring multi,$(MAKECMDGOALS)),)
OBJECTS_LIST += $(OBJ_M)
@ -179,17 +179,34 @@ library: $(FT_LIBRARY)
$(FT_COMPILE) $T$@ $<
clean_freetype:
-$(DELETE) $(OBJ_S:/=$(SEP)) $(OBJ_M:/=$(SEP))
# Standard cleaning and distclean rules. These are not accepted
# on all systems though..
#
clean_freetype_std:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_S) $(OBJ_M))
distclean_freetype: clean_freetype
-$(DELETE) $(FT_LIBRARY:/=$(SEP))
distclean_freetype_std: clean_freetype_std
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY))
-$(DELETE) *.orig *~ core *.core
remove_config_mk:
-$(DELETE) $(CONFIG_MK:/=$(SEP))
# The Dos command shell does not support very long list of arguments
# so we're stuck with wildcards
#
#SYSOBJ_ := $(subst $(SEP),\,$(OBJ_))
clean_freetype_dos:
-del $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul
distclean_freetype_dos: clean_freetype_dos
-del $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
remove_config_mk:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) 2> nul
# the "config.mk" must define 'clean_freetype' and 'distclean_freetype'
# implementations may use to relay these to either the 'std' or 'dos'
# versions, or simply provide their own implementation..
#
clean: clean_freetype
distclean: distclean_freetype remove_config_mk

View File

@ -36,8 +36,8 @@ FT_MODULE_LIST := $(BUILD)$(SEP)ftmodule.h
# file in order to `clean' the list
#
clean_module_list:
@$(DELETE) $(FT_MODULE_LIST)
@echo Regenerating the font drivers list in '$(FT_MODULE_LIST)'
@-$(DELETE) $(FT_MODULE_LIST)
@-echo Regenerating the font drivers list in $(FT_MODULE_LIST)
make_module_list: clean_module_list
@echo -- done --

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -78,13 +81,24 @@
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -151,11 +165,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -78,13 +81,24 @@
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/os2
PLATFORM := os2
CC := gcc
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -151,26 +165,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
# A rule used to clean all objects from OBJ_DIR
#
# The OS/2 command shell does not support very long list of arguments
# so we're stuck with wildcards
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
DIR_OBJ := $(subst $(SEP),\,$(OBJ_DIR))
clean_freetype_objects:
-del $(DIR8OBJ)\*.$O
clean_freetype_lib:
-del $(FT_LIBRARY)
clean: clean_freetype_objects
# Librarian to use to build the static library
#

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix
PLATFORM := unix
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -154,10 +168,17 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_std
distclean_freetype: clean_freetype_library_std
# 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

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,12 +85,23 @@ endif
DELETE := rm -f
SEP := /
HOSTSEP := $(SEP)
BUILD := $(TOP)/config/unix
PLATFORM := unix
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -154,10 +168,17 @@ ifndef CFLAGS
CFLAGS := -c -g -O0 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_std
distclean_freetype: distclean_freetype_std
# 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

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/config/win32
PLATFORM := win32
CC := gcc
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)/obj
# 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
@ -155,11 +169,18 @@ ifndef CFLAGS
CFLAGS := -c -g -O6 -Wall
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
@ -172,7 +193,7 @@ FT_LIBRARIAN := $(AR) -r
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif

View File

@ -30,9 +30,12 @@
#* BUILD Pathname to the platform-specific files used
#* for the build. Usually `$(TOP)/config/<system>'
#*
#* SEP Directory separator for the current platform.
#* Either / or \ (maybe : on Macs)
#*
#* SEP Directory separator used during compilation.
#* (usually "/" or "\"). Note that on Win32, both gcc
#* and Visual C++ use "/" as a directory separator !!
#*
#* HOSTSEP Directory separator for $(COPY) and $(DELETE)
#*
#* DELETE The forced remove/delete command to erase one or more
#* files
#*
@ -82,13 +85,24 @@ endif
DELETE := del
SEP := /
HOSTSEP := \\
BUILD := $(TOP)$(SEP)config$(SEP)win32
PLATFORM := win32
CC := lcc
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)$(SEP)obj
# 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
@ -156,10 +170,18 @@ ifndef CFLAGS
CFLAGS := -c -g2 -O
endif
# ANSIFLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSIFLAGS :=
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# 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 :

View File

@ -78,13 +78,24 @@
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)$(SEP)config$(SEP)win32
PLATFORM := win32
CC := cl
# the directory where all object files are placed
#
OBJ_DIR := $(TOP)$(SEP)obj
# 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
@ -147,27 +158,29 @@ T := /Fo
# - ansi compliance..
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /Za /W3 /WX
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
endif
# ANSI_FLAGS : put there the flags used to make your compiler ANSI-compliant
# nothing (if it already is by default like LCC).
#
ANSI_FLAGS := /Za
ifdef BUILD_FREETYPE
include $(TOP)/config/freetype.mk
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# 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}
#
# The LCC-Win32 Librarian, called LCCLIB needs all object files in the current
# directory. That _is_ stupid, but we'll have to deal with it..
#
DIR_OBJ := $(subst /,\\,$(OBJ_DIR))
$(FT_LIBRARY): $(OBJECTS_LIST)
lib /out:$@ $(OBJECTS_LIST)
lib /nologo /out:$@ $(OBJECTS_LIST)
endif