some updates. The yesterday modifications prevented the demo programs from compiling under Unix. fixed..
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
diff --git a/config/freetype.mk b/config/freetype.mk
index 93764b2..fa18bef 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 779b0d8..8135405 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 65bb2ed..7c33224 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
@@ -118,35 +139,6 @@ 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'.
# It is ".exe" on DOS-ish platforms, and nothing otherwise
#
diff --git a/demos/graph/rules.mk b/demos/graph/rules.mk
index f034625..a9de576 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)