|
@@ -7,11 +7,6 @@
|
7
|
7
|
#
|
8
|
8
|
CLEANUP := $(BIN)/*.* # *.* to avoid catching the "CVS" directory
|
9
|
9
|
|
10
|
|
-# Show what we're using for "echo -e"
|
11
|
|
-#
|
12
|
|
-echo :
|
13
|
|
- @$(ECHO) Using "$(ECHO)" to echo
|
14
|
|
-
|
15
|
10
|
# Version number calculations
|
16
|
11
|
#
|
17
|
12
|
VERSION_MAJOR = 0
|
|
@@ -44,6 +39,32 @@ version :
|
44
|
39
|
@$(TOUCH) $@
|
45
|
40
|
VERYCLEANUP += .toolcheck
|
46
|
41
|
|
|
42
|
+# Find a usable "echo -e" substitute.
|
|
43
|
+#
|
|
44
|
+TAB := $(shell printf "\t")
|
|
45
|
+ifeq ($(shell echo '\t'),$(TAB))
|
|
46
|
+ECHO_E ?= echo
|
|
47
|
+endif
|
|
48
|
+ifeq ($(shell echo -e '\t'),$(TAB))
|
|
49
|
+ECHO_E ?= echo -e
|
|
50
|
+endif
|
|
51
|
+ifeq ($(shell /bin/echo '\t'),$(TAB))
|
|
52
|
+ECHO_E ?= /bin/echo
|
|
53
|
+endif
|
|
54
|
+ifeq ($(shell /bin/echo -e '\t'),$(TAB))
|
|
55
|
+ECHO_E ?= /bin/echo -e
|
|
56
|
+endif
|
|
57
|
+.echocheck :
|
|
58
|
+ifdef ECHO_E
|
|
59
|
+ $(TOUCH) $@
|
|
60
|
+else
|
|
61
|
+ @echo "No usable \"echo -e\" substitute found"
|
|
62
|
+ @exit 1
|
|
63
|
+endif
|
|
64
|
+VERYCLEANUP += .echocheck
|
|
65
|
+echo :
|
|
66
|
+ @$(ECHO) "Using \"$(ECHO_E)\" for \"echo -e\""
|
|
67
|
+
|
47
|
68
|
# Build verbosity
|
48
|
69
|
#
|
49
|
70
|
ifeq ($(V),1)
|
|
@@ -126,7 +147,7 @@ define obj_template
|
126
|
147
|
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
|
127
|
148
|
-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
|
128
|
149
|
sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
|
129
|
|
- @$(ECHO) '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
|
150
|
+ @$(ECHO_E) '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
130
|
151
|
'\n\t$$(QM)$(ECHO) " [BUILD] $$@"\n' \
|
131
|
152
|
'\n\t$$(RULE_$(3))\n' \
|
132
|
153
|
'\nBOBJS += $$(BIN)/$(4).o\n' \
|
|
@@ -373,7 +394,7 @@ define media_template
|
373
|
394
|
@$(MKDIR) -p $(dir $(2))
|
374
|
395
|
@$(RM) $(2)
|
375
|
396
|
@$(TOUCH) $(2)
|
376
|
|
- @$(ECHO) '$$(BIN)/%.$(1) : $$(BIN)/%.$(1).zbin' \
|
|
397
|
+ @$(ECHO_E) '$$(BIN)/%.$(1) : $$(BIN)/%.$(1).zbin' \
|
377
|
398
|
'\n\t$$(QM)$(ECHO) " [FINISH] $$@"' \
|
378
|
399
|
'\n\t$$(Q)$$(CP) $$< $$@' \
|
379
|
400
|
'\n\t$$(Q)$$(FINALISE_$(1))' \
|