From d00a8ce6f2be7a1f5104648dcf7fe4a722fb4ace Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 18 Jan 2000 09:52:08 +0000 Subject: [PATCH] some updates. The yesterday modifications prevented the demo programs from compiling under Unix. fixed.. --- config/freetype.mk | 7 +++--- config/unix/Makefile | 2 +- demos/Makefile | 54 +++++++++++++++++++------------------------- demos/graph/rules.mk | 2 +- 4 files changed, 28 insertions(+), 37 deletions(-) diff --git a/config/freetype.mk b/config/freetype.mk index 93764b281..fa18bef0d 100644 --- a/config/freetype.mk +++ b/config/freetype.mk @@ -183,16 +183,15 @@ library: $(FT_LIBRARY) # on all systems though.. # clean_freetype_std: - -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_S) $(OBJ_M)) + -$(DELETE) $(OBJ_S) $(OBJ_M) distclean_freetype_std: clean_freetype_std - -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) + -$(DELETE) $(FT_LIBRARY) -$(DELETE) *.orig *~ core *.core # 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 @@ -201,7 +200,7 @@ 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 + -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) # the "config.mk" must define 'clean_freetype' and 'distclean_freetype' # implementations may use to relay these to either the 'std' or 'dos' diff --git a/config/unix/Makefile b/config/unix/Makefile index 779b0d87c..813540595 100644 --- a/config/unix/Makefile +++ b/config/unix/Makefile @@ -178,7 +178,7 @@ ifdef BUILD_FREETYPE include $(TOP)/config/freetype.mk clean_freetype: clean_freetype_std -distclean_freetype: clean_freetype_library_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 diff --git a/demos/Makefile b/demos/Makefile index 65bb2ed61..7c33224da 100644 --- a/demos/Makefile +++ b/demos/Makefile @@ -54,17 +54,38 @@ include $(CONFIG_MK) # Define a few important variables now # # -TOP_ := $(TOP)$(SEP) -SRC_ := $(TOP)$(SEP)src$(SEP) +TOP_ := $(TOP)$(SEP) +TOP2_ := $(TOP2)$(SEP) +SRC_ := $(TOP)$(SEP)src$(SEP) BIN_ := bin$(SEP) OBJ_ := obj$(SEP) GRAPH_DIR := graph +ifeq ($(TOP),..) SRC_DIR := src +else +SRC_DIR := $(TOP2_)src +endif + SRC_DIR_ := $(SRC_DIR)$(SEP) +FT_INCLUDES := $(BUILD) $(TOP_)include $(SRC_)base $(SRC_DIR) +TT_INCLUDES := $(SRC_)shared $(SRC_)truetype +T1_INCLUDES := $(SRC_)shared $(SRC_)type1 + +COMPILE = $(CC) $(CFLAGS) $(INCLUDES:%=$I%) +LINK := $(CC) +FTLIB := $(TOP_)$(LIB_DIR)$(SEP)$(LIBRARY).$A + +# the default commands used to link the executables. These can +# be re-defined for platform-specific stuff.. +# +LINK = $(CC) $T$@ $< $(FTLIB) $(EFENCE) +COMMON_LINK = $(LINK) $(COMMON_OBJ) +GRAPH_LINK = $(COMMON_LINK) $(GRAPH_LIB) + .PHONY: exes clean distclean @@ -116,35 +137,6 @@ endif clean: clean_demo distclean: distclean_demo -#################################################################### -# -# Define a few important variables now -# -# -TOP_ := $(TOP)$(SEP) -TOP2_ := $(TOP2)$(SEP) -SRC_ := $(TOP)$(SEP)src$(SEP) - -BIN_ := bin$(SEP) -OBJ_ := obj$(SEP) - -GRAPH_DIR := $(TOP2_)graph - -SRC_DIR := $(TOP2_)src -SRC_DIR_ := $(SRC_DIR)$(SEP) - - -FT_INCLUDES := $(BUILD) $(TOP_)include $(SRC_)base $(SRC_DIR) -TT_INCLUDES := $(SRC_)shared $(SRC_)truetype -T1_INCLUDES := $(SRC_)shared $(SRC_)type1 - -COMPILE = $(CC) $(CFLAGS) $(INCLUDES:%=$I%) -LINK := $(CC) -FTLIB := $(TOP_)$(LIB_DIR)$(SEP)$(LIBRARY).$A - -LINK = $(CC) $(LINKT)$@ $< $(FTLIB) $(EFENCE) -COMMON_LINK = $(COMMON_OBJ) - #################################################################### # # Compute the executable suffix to use, and put it in `E'. diff --git a/demos/graph/rules.mk b/demos/graph/rules.mk index f03462566..a9de5766c 100644 --- a/demos/graph/rules.mk +++ b/demos/graph/rules.mk @@ -47,7 +47,7 @@ GRAPH_INCLUDES := $(TOP2_)graph GRAPH_LIB := $(OBJ_)graph.$A -GRAPH_LINK := $(GRAPH_LIB) +#GRAPH_LINK := $(GRAPH_LIB) GRAPH_ := $(TOP2_)graph$(SEP)