summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/Makefile90
-rw-r--r--apps/bitmaps/Makefile34
-rw-r--r--apps/bitmaps/mono/Makefile7
-rw-r--r--apps/bitmaps/native/Makefile5
-rw-r--r--apps/bitmaps/remote_mono/Makefile5
-rw-r--r--apps/bitmaps/remote_native/Makefile5
-rw-r--r--apps/codecs/Makefile54
-rw-r--r--apps/codecs/Tremor/Makefile8
-rw-r--r--apps/codecs/lib/Makefile8
-rw-r--r--apps/codecs/libFLAC/Makefile13
-rw-r--r--apps/codecs/liba52/Makefile8
-rw-r--r--apps/codecs/libalac/Makefile8
-rw-r--r--apps/codecs/libfaad/Makefile8
-rw-r--r--apps/codecs/libffmpegFLAC/Makefile8
-rw-r--r--apps/codecs/libm4a/Makefile8
-rw-r--r--apps/codecs/libmad/Makefile8
-rw-r--r--apps/codecs/libmusepack/Makefile8
-rw-r--r--apps/plugins/Makefile48
-rw-r--r--apps/plugins/bitmaps/Makefile34
-rw-r--r--apps/plugins/bitmaps/mono/Makefile3
-rw-r--r--apps/plugins/bitmaps/native/Makefile3
-rw-r--r--apps/plugins/bitmaps/remote_mono/Makefile3
-rw-r--r--apps/plugins/bitmaps/remote_native/Makefile3
-rw-r--r--apps/plugins/chessbox/Makefile25
-rw-r--r--apps/plugins/databox/Makefile25
-rw-r--r--apps/plugins/doom/Makefile30
-rw-r--r--apps/plugins/lib/Makefile8
-rw-r--r--apps/plugins/mpegplayer/Makefile25
-rw-r--r--apps/plugins/pacbox/Makefile25
-rw-r--r--apps/plugins/rockboy/Makefile25
-rw-r--r--apps/plugins/searchengine/Makefile25
-rw-r--r--apps/plugins/sudoku/Makefile25
-rw-r--r--apps/plugins/zxbox/Makefile17
33 files changed, 214 insertions, 395 deletions
diff --git a/apps/Makefile b/apps/Makefile
index a6c75848d3..00612fa499 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -91,49 +91,52 @@ $(DEPFILE): $(BITMAPLIBS)
91dep: $(DEPFILE) 91dep: $(DEPFILE)
92 92
93build-codecs: 93build-codecs:
94 @$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib 94 $(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib
95 @$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs 95 $(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs
96 96
97build-bitmaps: 97build-bitmapsmono:
98 @$(MAKE) -C bitmaps OBJDIR=$(OBJDIR)/bitmaps 98 $(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
99 99
100$(BITMAPLIBS): build-bitmaps 100build-bitmapsnative:
101 $(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
102
103build-bitmapsremotemono:
104 $(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
105
106build-bitmapsremotenative:
107 $(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
108
109$(BITMAPLIBS): $(BUILDDIR)/lib%.a: build-%
101 110
102rocks: build-codecs 111rocks: build-codecs
103 @$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib 112 $(SILENT)$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib
104 @$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins 113 $(SILENT)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins
105 114
106$(LINKFILE): $(LDS) 115$(LINKFILE): $(LDS)
107 @echo "Build $(notdir $@)" 116 $(call PRINTS,Build $(@F))cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
108 @cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
109 117
110$(LINKROM): $(ROMLDS) 118$(LINKROM): $(ROMLDS)
111 @echo "Build $(notdir $@)" 119 $(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
112 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
113 120
114$(MAXOUTFILE): 121$(MAXOUTFILE):
115 @echo '#include "config.h"' > $(MAXINFILE) 122 $(SILENT)echo '#include "config.h"' > $(MAXINFILE)
116 @echo "ROM_START" >> $(MAXINFILE) 123 $(SILENT)echo "ROM_START" >> $(MAXINFILE)
117 @cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE) 124 $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
118 @rm $(MAXINFILE) 125 $(SILENT)rm $(MAXINFILE)
119 126
120$(OBJDIR)/rombox.elf : $(OBJS) $(LINKROM) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS) 127$(OBJDIR)/rombox.elf : $(OBJS) $(LINKROM) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS)
121 @echo "LD $(notdir $@)" 128 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lgcc $(LINKBITMAPS) -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(OBJDIR)/rombox.map
122 @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lgcc $(LINKBITMAPS) -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(OBJDIR)/rombox.map
123 129
124ifndef SIMVER 130ifndef SIMVER
125 131
126$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS) 132$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS)
127 @echo "LD $(notdir $@)" 133 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
128 @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
129 134
130$(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf 135$(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf
131 @echo "OBJCOPY $(notdir $@)" 136 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
132 @$(OC) -O binary $< $@
133 137
134$(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf 138$(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf
135 @echo "OBJCOPY $(notdir $@)" 139 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
136 @$(OC) -O binary $< $@
137 140
138$(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin 141$(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin
139 $(TOOLSDIR)/sh2d -sh1 $< > $@ 142 $(TOOLSDIR)/sh2d -sh1 $< > $@
@@ -145,8 +148,7 @@ $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin
145# instead. 148# instead.
146# 149#
147$(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) 150$(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE)
148 @echo "Build firmware file" 151 $(call PRINTS,Build firmware file)($(MKFIRMWARE) $< $@; \
149 $(SILENT)($(MKFIRMWARE) $< $@; \
150 stat=$$?; \ 152 stat=$$?; \
151 if test -n "$(FLASHFILE)"; then \ 153 if test -n "$(FLASHFILE)"; then \
152 if test "$$stat" -ne 0; then \ 154 if test "$$stat" -ne 0; then \
@@ -174,50 +176,44 @@ endif
174 176
175$(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \ 177$(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \
176 $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(BITMAPLIBS) 178 $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(BITMAPLIBS)
177 @echo "LD $(BINARY)" 179 $(call PRINTS,LD $(BINARY))$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP)
178 $(SILENT)$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP)
179endif 180endif
180 181
181$(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin 182$(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin
182 $(SILENT)(echo "UCLPACK rockbox" ; \ 183 $(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1
183 $(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;)
184 184
185$(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE) 185$(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE)
186 $(SILENT)(echo "UCLPACK rombox" ; \ 186 $(call PRINTS,UCLPACK rombox)$(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \
187 $(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \
188 perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \ 187 perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \
189 if test $$? -ne 0; then \ 188 if test $$? -ne 0; then \
190 echo "removing UCL file again, making it a fake one"; \ 189 echo "removing UCL file again, making it a fake one"; \
191 echo "fake" > $@; \ 190 echo "fake" > $@; \
192 fi) 191 fi
193 192
194include $(TOOLSDIR)/make.inc 193include $(TOOLSDIR)/make.inc
195 194
196$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang 195$(OBJDIR)/lang.o: lang/$(LANGUAGE).lang
197 @echo "GENLANG"
198 @mkdir -p $(dir $@) 196 @mkdir -p $(dir $@)
199 $(SILENT)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $< 197 $(call PRINTS,GENLANG)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $<
200 @echo "CC lang.c" 198 $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
201 @$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@
202 199
203clean: 200clean:
204 @echo "cleaning apps" 201 $(call PRINTS,cleaning apps)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \
205 @-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \
206 $(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \ 202 $(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \
207 $(OBJDIR)/lang.o $(OBJDIR)/build.lang $(BUILDDIR)/lang.[ch] \ 203 $(OBJDIR)/lang.o $(OBJDIR)/build.lang $(BUILDDIR)/lang.[ch] \
208 $(LINKFILE) $(BUILDDIR)/rockbox.ucl $(LINKROM) \ 204 $(LINKFILE) $(BUILDDIR)/rockbox.ucl $(LINKROM) \
209 $(BUILDDIR)/rombox.ucl $(OBJDIR)/rombox.bin $(OBJDIR)/rombox.elf \ 205 $(BUILDDIR)/rombox.ucl $(OBJDIR)/rombox.bin $(OBJDIR)/rombox.elf \
210 $(MAXOUTFILE) $(DEPFILE) 206 $(MAXOUTFILE) $(DEPFILE)
211 @$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono 207 $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
212 @$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native 208 $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native
213 @$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono 209 $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono
214 @$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native 210 $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native
215 @$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins 211 $(SILENT)$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins
216 @$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs 212 $(SILENT)$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs
217 @rm -rf $(OBJDIR)/recorder $(OBJDIR)/player 213 $(SILENT)rm -rf $(OBJDIR)/recorder $(OBJDIR)/player
218 @rm -rf $(BUILDDIR)/bitmaps 214 $(SILENT)rm -rf $(BUILDDIR)/bitmaps
219ifdef SIMVER 215ifdef SIMVER
220 @$(MAKE) -C $(SIMDIR) clean 216 $(SILENT)$(MAKE) -C $(SIMDIR) clean
221endif 217endif
222 218
223ifneq ($(MAKECMDGOALS),clean) 219ifneq ($(MAKECMDGOALS),clean)
diff --git a/apps/bitmaps/Makefile b/apps/bitmaps/Makefile
deleted file mode 100644
index aa43615894..0000000000
--- a/apps/bitmaps/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10ifndef V
11SILENT=@
12endif
13
14all:
15ifneq ($(strip $(BMP2RB_NATIVE)),)
16 @echo "MAKE in bitmaps/native"
17 $(SILENT)mkdir -p $(OBJDIR)/native
18 @$(MAKE) -C native OBJDIR=$(OBJDIR)/native
19endif
20ifneq ($(strip $(BMP2RB_MONO)),)
21 @echo "MAKE in bitmaps/mono"
22 $(SILENT)mkdir -p $(OBJDIR)/mono
23 @$(MAKE) -C mono OBJDIR=$(OBJDIR)/mono
24endif
25ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
26 @echo "MAKE in bitmaps/remote_native"
27 $(SILENT)mkdir -p $(OBJDIR)/remote_native
28 @$(MAKE) -C remote_native OBJDIR=$(OBJDIR)/remote_native
29endif
30ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
31 @echo "MAKE in bitmaps/remote_mono"
32 $(SILENT)mkdir -p $(OBJDIR)/remote_mono
33 @$(MAKE) -C remote_mono OBJDIR=$(OBJDIR)/remote_mono
34endif
diff --git a/apps/bitmaps/mono/Makefile b/apps/bitmaps/mono/Makefile
index dede4e81d9..28893e914d 100644
--- a/apps/bitmaps/mono/Makefile
+++ b/apps/bitmaps/mono/Makefile
@@ -5,7 +5,7 @@
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/ 6# \/ \/ \/ \/ \/
7# $Id$ 7# $Id$
8# 8#
9 9
10INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ 10INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
11 -I$(OBJDIR) 11 -I$(OBJDIR)
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/bitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning bitmaps/mono" 29 $(call PRINTS,cleaning bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 $(SILENT)rmdir $(OBJDIR)
31 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/bitmaps/native/Makefile b/apps/bitmaps/native/Makefile
index 49e941799e..96f7e50a56 100644
--- a/apps/bitmaps/native/Makefile
+++ b/apps/bitmaps/native/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/bitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning bitmaps/native" 29 $(call PRINTS,cleaning bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 $(SILENT)rmdir $(OBJDIR)
31 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/bitmaps/remote_mono/Makefile b/apps/bitmaps/remote_mono/Makefile
index dd781242b5..db707c7542 100644
--- a/apps/bitmaps/remote_mono/Makefile
+++ b/apps/bitmaps/remote_mono/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/bitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning bitmaps/remotemono" 29 $(call PRINTS,cleaning bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 $(SILENT)rmdir $(OBJDIR)
31 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/bitmaps/remote_native/Makefile b/apps/bitmaps/remote_native/Makefile
index 573ee554b2..03eccfd5ce 100644
--- a/apps/bitmaps/remote_native/Makefile
+++ b/apps/bitmaps/remote_native/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/bitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning bitmaps/remote_native" 29 $(call PRINTS,cleaning bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) 30 $(SILENT)rmdir $(OBJDIR)
31 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile
index cd0677aebf..12235b490c 100644
--- a/apps/codecs/Makefile
+++ b/apps/codecs/Makefile
@@ -66,12 +66,10 @@ $(OBJDIR)/wav_enc.elf: $(OBJDIR)/wav_enc.o
66$(OBJDIR)/wavpack_enc.elf: $(OBJDIR)/wavpack_enc.o $(BUILDDIR)/libwavpack.a 66$(OBJDIR)/wavpack_enc.elf: $(OBJDIR)/wavpack_enc.o $(BUILDDIR)/libwavpack.a
67 67
68$(OBJDIR)/%.elf: 68$(OBJDIR)/%.elf:
69 @echo "LD $(notdir $@)" 69 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $^ -L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) -Wl,-Map,$(OBJDIR)/$*.map
70 $(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $^ -L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) -Wl,-Map,$(OBJDIR)/$*.map
71 70
72$(OBJDIR)/%.codec : $(OBJDIR)/%.elf 71$(OBJDIR)/%.codec : $(OBJDIR)/%.elf
73 @echo "OBJCOPY $(notdir $@)" 72 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
74 $(SILENT)$(OC) -O binary $< $@
75else 73else
76 74
77ifeq ($(SIMVER), x11) 75ifeq ($(SIMVER), x11)
@@ -79,8 +77,7 @@ ifeq ($(SIMVER), x11)
79# This is the X11 simulator version 77# This is the X11 simulator version
80 78
81$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) 79$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT)
82 @echo "LD $(notdir $@)" 80 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
83 $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
84ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 81ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
85# 'x' must be kept or you'll have "Win32 error 5" 82# 'x' must be kept or you'll have "Win32 error 5"
86# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 83# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -95,8 +92,7 @@ ifeq ($(SIMVER), sdl)
95# This is the SDL simulator version 92# This is the SDL simulator version
96 93
97$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) 94$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT)
98 @echo "LD $(notdir $@)" 95 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
99 $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@
100ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 96ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
101# 'x' must be kept or you'll have "Win32 error 5" 97# 'x' must be kept or you'll have "Win32 error 5"
102# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 98# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -112,8 +108,7 @@ DLLTOOLFLAGS = --export-all
112DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 108DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
113 109
114$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) 110$(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT)
115 @echo "DLL $(notdir $@)" 111 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
116 $(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
117 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< \ 112 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< \
118 $(BUILDDIR)/libcodec.a $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) \ 113 $(BUILDDIR)/libcodec.a $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) \
119 -o $@ 114 -o $@
@@ -132,85 +127,72 @@ endif # end of simulator section
132include $(TOOLSDIR)/make.inc 127include $(TOOLSDIR)/make.inc
133 128
134$(BUILDDIR)/libcodec.a: 129$(BUILDDIR)/libcodec.a:
135 @echo "MAKE in codecs/lib"
136 $(SILENT)mkdir -p $(OBJDIR)/lib 130 $(SILENT)mkdir -p $(OBJDIR)/lib
137 $(SILENT)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib 131 $(call PRINTS,MAKE in codecs/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
138 132
139$(LINKCODEC): $(LDS) 133$(LINKCODEC): $(LDS)
140 @echo "build $(notdir $@)" 134 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
141 $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
142 135
143$(BUILDDIR)/libmad.a: libmad 136$(BUILDDIR)/libmad.a: libmad
144 137
145libmad: 138libmad:
146 @echo "MAKE in libmad"
147 $(SILENT)mkdir -p $(OBJDIR)/libmad 139 $(SILENT)mkdir -p $(OBJDIR)/libmad
148 $(SILENT)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a 140 $(call PRINTS,MAKE in libmad)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a
149 141
150$(BUILDDIR)/liba52.a: liba52 142$(BUILDDIR)/liba52.a: liba52
151 143
152liba52: 144liba52:
153 @echo "MAKE in liba52"
154 $(SILENT)mkdir -p $(OBJDIR)/liba52 145 $(SILENT)mkdir -p $(OBJDIR)/liba52
155 $(SILENT)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a 146 $(call PRINTS,MAKE in liba52)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a
156 147
157$(BUILDDIR)/libffmpegFLAC.a: libffmpegFLAC 148$(BUILDDIR)/libffmpegFLAC.a: libffmpegFLAC
158 149
159libffmpegFLAC: 150libffmpegFLAC:
160 @echo "MAKE in libffmpegFLAC"
161 $(SILENT)mkdir -p $(OBJDIR)/libffmpegFLAC 151 $(SILENT)mkdir -p $(OBJDIR)/libffmpegFLAC
162 $(SILENT)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a 152 $(call PRINTS,MAKE in libffmpegFLAC)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a
163 153
164$(BUILDDIR)/libTremor.a: libTremor 154$(BUILDDIR)/libTremor.a: libTremor
165 155
166libTremor: 156libTremor:
167 @echo "MAKE in Tremor"
168 $(SILENT)mkdir -p $(OBJDIR)/Tremor 157 $(SILENT)mkdir -p $(OBJDIR)/Tremor
169 $(SILENT)$(MAKE) -C Tremor OBJDIR=$(OBJDIR)/Tremor OUTPUT=$(BUILDDIR)/libTremor.a 158 $(call PRINTS,MAKE in Tremor)$(MAKE) -C Tremor OBJDIR=$(OBJDIR)/Tremor OUTPUT=$(BUILDDIR)/libTremor.a
170 159
171$(BUILDDIR)/libwavpack.a: libwavpack 160$(BUILDDIR)/libwavpack.a: libwavpack
172 161
173libwavpack: 162libwavpack:
174 @echo "MAKE in libwavpack"
175 $(SILENT)mkdir -p $(OBJDIR)/libwavpack 163 $(SILENT)mkdir -p $(OBJDIR)/libwavpack
176 $(SILENT)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a 164 $(call PRINTS,MAKE in libwavpack)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a
177 165
178dumb: 166dumb:
179 @echo "MAKE in dumb"
180 $(SILENT)mkdir -p $(OBJDIR)/dumb 167 $(SILENT)mkdir -p $(OBJDIR)/dumb
181 $(SILENT)$(MAKE) -C dumb OBJDIR=$(OBJDIR)/dumb LIBDIR=$(BUILDDIR) OFLAGS="$(CFLAGS)" 168 $(call PRINTS,MAKE in dumb)$(MAKE) -C dumb OBJDIR=$(OBJDIR)/dumb LIBDIR=$(BUILDDIR) OFLAGS="$(CFLAGS)"
182 169
183$(BUILDDIR)/libmusepack.a: libmusepack 170$(BUILDDIR)/libmusepack.a: libmusepack
184 171
185libmusepack: 172libmusepack:
186 @echo "MAKE in libmusepack"
187 $(SILENT)mkdir -p $(OBJDIR)/libmusepack 173 $(SILENT)mkdir -p $(OBJDIR)/libmusepack
188 $(SILENT)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a 174 $(call PRINTS,MAKE in libmusepack)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a
189 175
190$(BUILDDIR)/libalac.a: libalac 176$(BUILDDIR)/libalac.a: libalac
191 177
192libalac: 178libalac:
193 @echo "MAKE in libalac"
194 $(SILENT)mkdir -p $(OBJDIR)/libalac 179 $(SILENT)mkdir -p $(OBJDIR)/libalac
195 $(SILENT)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a 180 $(call PRINTS,MAKE in libalac)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a
196 181
197$(BUILDDIR)/libm4a.a: libm4a 182$(BUILDDIR)/libm4a.a: libm4a
198 183
199libm4a: 184libm4a:
200 @echo "MAKE in libm4a"
201 $(SILENT)mkdir -p $(OBJDIR)/libm4a 185 $(SILENT)mkdir -p $(OBJDIR)/libm4a
202 $(SILENT)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a 186 $(call PRINTS,MAKE in libm4a)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a
203 187
204$(BUILDDIR)/libfaad.a: libfaad 188$(BUILDDIR)/libfaad.a: libfaad
205 189
206libfaad: 190libfaad:
207 @echo "MAKE in libfaad"
208 $(SILENT)mkdir -p $(OBJDIR)/libfaad 191 $(SILENT)mkdir -p $(OBJDIR)/libfaad
209 $(SILENT)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a 192 $(call PRINTS,MAKE in libfaad)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a
210 193
211clean: 194clean:
212 @echo "cleaning codecs" 195 $(call PRINTS,cleaning codecs)rm -fr $(OBJDIR)/libmad $(BUILDDIR)/libmad.a $(OBJDIR)/liba52 $(BUILDDIR)/liba52.a $(OBJDIR)/libffmpegFLAC $(BUILDDIR)/libffmpegFLAC.a $(OBJDIR)/Tremor $(BUILDDIR)/libTremor.a $(OBJDIR)/libwavpack $(BUILDDIR)/libwavpack.a $(OBJDIR)/dumb $(BUILDDIR)/libdumb.a $(BUILDDIR)/libdumbd.a $(OBJDIR)/libmusepack $(BUILDDIR)/libmusepack.a $(OBJDIR)/libalac $(BUILDDIR)/libalac.a $(OBJDIR)/libfaad $(BUILDDIR)/libfaad.a $(OBJDIR)/libm4a $(BUILDDIR)/libm4a.a
213 $(SILENT)rm -fr $(OBJDIR)/libmad $(BUILDDIR)/libmad.a $(OBJDIR)/liba52 $(BUILDDIR)/liba52.a $(OBJDIR)/libffmpegFLAC $(BUILDDIR)/libffmpegFLAC.a $(OBJDIR)/Tremor $(BUILDDIR)/libTremor.a $(OBJDIR)/libwavpack $(BUILDDIR)/libwavpack.a $(OBJDIR)/dumb $(BUILDDIR)/libdumb.a $(BUILDDIR)/libdumbd.a $(OBJDIR)/libmusepack $(BUILDDIR)/libmusepack.a $(OBJDIR)/libalac $(BUILDDIR)/libalac.a $(OBJDIR)/libfaad $(BUILDDIR)/libfaad.a $(OBJDIR)/libm4a $(BUILDDIR)/libm4a.a
214 $(SILENT)$(MAKE) -C libmad clean OBJDIR=$(OBJDIR)/libmad 196 $(SILENT)$(MAKE) -C libmad clean OBJDIR=$(OBJDIR)/libmad
215 $(SILENT)$(MAKE) -C liba52 clean OBJDIR=$(OBJDIR)/liba52 197 $(SILENT)$(MAKE) -C liba52 clean OBJDIR=$(OBJDIR)/liba52
216 $(SILENT)$(MAKE) -C libffmpegFLAC clean OBJDIR=$(OBJDIR)/libffmpegFLAC 198 $(SILENT)$(MAKE) -C libffmpegFLAC clean OBJDIR=$(OBJDIR)/libffmpegFLAC
diff --git a/apps/codecs/Tremor/Makefile b/apps/codecs/Tremor/Makefile
index ee91a05af9..c3c4ae7cdb 100644
--- a/apps/codecs/Tremor/Makefile
+++ b/apps/codecs/Tremor/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning Tremor" 39 $(call PRINTS,cleaning Tremor)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/lib/Makefile b/apps/codecs/lib/Makefile
index fcf84c2acd..9f831d5f92 100644
--- a/apps/codecs/lib/Makefile
+++ b/apps/codecs/lib/Makefile
@@ -33,14 +33,12 @@ OUTPUT = $(BUILDDIR)/libcodec.a
33all: $(OUTPUT) 33all: $(OUTPUT)
34 34
35$(OUTPUT): $(OBJS) 35$(OUTPUT): $(OBJS)
36 @echo "AR+RANLIB $(notdir $@)" 36 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
37 @$(AR) ruv $@ $+ >/dev/null 2>&1 37 $(SILENT)$(RANLIB) $@
38 @$(RANLIB) $@
39 38
40include $(TOOLSDIR)/make.inc 39include $(TOOLSDIR)/make.inc
41 40
42clean: 41clean:
43 @echo "cleaning codecs/lib" 42 $(call PRINTS,cleaning codecs/lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
44 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
45 43
46-include $(DEPFILE) 44-include $(DEPFILE)
diff --git a/apps/codecs/libFLAC/Makefile b/apps/codecs/libFLAC/Makefile
index 221b934c13..b8ab586200 100644
--- a/apps/codecs/libFLAC/Makefile
+++ b/apps/codecs/libFLAC/Makefile
@@ -44,19 +44,16 @@ OUTPUT = $(BUILDDIR)/libFLAC.a
44all: $(OUTPUT) 44all: $(OUTPUT)
45 45
46$(OUTPUT): $(OBJS) 46$(OUTPUT): $(OBJS)
47 @echo "AR+RANLIB $(notdir $@)" 47 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
48 @$(AR) ruv $@ $+ >/dev/null 2>&1 48 $(SILENT)$(RANLIB) $@
49 @$(RANLIB) $@
50 49
51$(OBJDIR)/libFLAC/%.o: $(APPSDIR)/codecs/libFLAC/%.c 50$(OBJDIR)/libFLAC/%.o: $(APPSDIR)/codecs/libFLAC/%.c
52 @mkdir -p $(OBJDIR)/libFLAC 51 $(SILENT)mkdir -p $(OBJDIR)/libFLAC
53 @echo "(libFLAC) CC $<" 52 $(call PRINTS,CC $(<F))$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libFLAC/include/FLAC $< -o $@
54 @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libFLAC/include/FLAC $< -o $@
55 53
56include $(TOOLSDIR)/make.inc 54include $(TOOLSDIR)/make.inc
57 55
58clean: 56clean:
59 @echo "cleaning libFLAC" 57 $(call PRINTS,cleaning libFLAC)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
60 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
61 58
62-include $(DEPFILE) 59-include $(DEPFILE)
diff --git a/apps/codecs/liba52/Makefile b/apps/codecs/liba52/Makefile
index b93f0c7336..4fefc8a8ff 100644
--- a/apps/codecs/liba52/Makefile
+++ b/apps/codecs/liba52/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning liba52" 39 $(call PRINTS,cleaning liba52)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/libalac/Makefile b/apps/codecs/libalac/Makefile
index 6f75a08e51..07b901139f 100644
--- a/apps/codecs/libalac/Makefile
+++ b/apps/codecs/libalac/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning libalac" 39 $(call PRINTS,cleaning libalac)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/libfaad/Makefile b/apps/codecs/libfaad/Makefile
index 4a59d6c872..8288b4ce79 100644
--- a/apps/codecs/libfaad/Makefile
+++ b/apps/codecs/libfaad/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning libfaad" 39 $(call PRINTS,cleaning libfaad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/libffmpegFLAC/Makefile b/apps/codecs/libffmpegFLAC/Makefile
index 27c17c8243..78c560bf75 100644
--- a/apps/codecs/libffmpegFLAC/Makefile
+++ b/apps/codecs/libffmpegFLAC/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning libffmpegFLAC" 39 $(call PRINTS,cleaning libffmpegFLAC)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/libm4a/Makefile b/apps/codecs/libm4a/Makefile
index 73b24bc214..1bc71e50b7 100644
--- a/apps/codecs/libm4a/Makefile
+++ b/apps/codecs/libm4a/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning libm4a" 39 $(call PRINTS,cleaning libm4a)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/codecs/libmad/Makefile b/apps/codecs/libmad/Makefile
index 7ee16d9e4c..13cde8f1f6 100644
--- a/apps/codecs/libmad/Makefile
+++ b/apps/codecs/libmad/Makefile
@@ -39,15 +39,13 @@ DIRS =
39all: $(OUTPUT) 39all: $(OUTPUT)
40 40
41$(OUTPUT): $(OBJS) 41$(OUTPUT): $(OBJS)
42 @echo "AR+RANLIB $(notdir $@)" 42 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
43 @$(AR) ruv $@ $+ >/dev/null 2>&1 43 $(SILENT)$(RANLIB) $@
44 @$(RANLIB) $@
45 44
46include $(TOOLSDIR)/make.inc 45include $(TOOLSDIR)/make.inc
47 46
48clean: 47clean:
49 @echo "cleaning libmad" 48 $(call PRINTS,cleaning libmad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
50 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
51 49
52ifneq ($(MAKECMDGOALS),clean) 50ifneq ($(MAKECMDGOALS),clean)
53-include $(DEPFILE) 51-include $(DEPFILE)
diff --git a/apps/codecs/libmusepack/Makefile b/apps/codecs/libmusepack/Makefile
index 68c2603580..d6bf174d2c 100644
--- a/apps/codecs/libmusepack/Makefile
+++ b/apps/codecs/libmusepack/Makefile
@@ -30,15 +30,13 @@ DIRS =
30all: $(OUTPUT) 30all: $(OUTPUT)
31 31
32$(OUTPUT): $(OBJS) 32$(OUTPUT): $(OBJS)
33 @echo "AR+RANLIB $(notdir $@)" 33 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
34 @$(AR) ruv $@ $+ >/dev/null 2>&1 34 $(SILENT)$(RANLIB) $@
35 @$(RANLIB) $@
36 35
37include $(TOOLSDIR)/make.inc 36include $(TOOLSDIR)/make.inc
38 37
39clean: 38clean:
40 @echo "cleaning libmusepack" 39 $(call PRINTS,cleaning libmusepack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
41 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
42 40
43ifneq ($(MAKECMDGOALS),clean) 41ifneq ($(MAKECMDGOALS),clean)
44-include $(DEPFILE) 42-include $(DEPFILE)
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index a35bcf7dfd..371a04ef4b 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -67,27 +67,32 @@ $(DEPFILE): $(BITMAPLIBS)
67dep: $(DEPFILE) 67dep: $(DEPFILE)
68 68
69$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS 69$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS
70 @echo "create credits.raw" 70 $(call PRINTS,create credits.raw)perl credits.pl < $< > $@
71 $(SILENT)perl credits.pl < $< > $@
72 71
73$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw 72$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw
74 $(SILENT)mkdir -p $(dir $@) 73 $(SILENT)mkdir -p $(dir $@)
75 @echo "CC $<" 74 $(call PRINTS,CC $(<F))$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
76 $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
77 75
78build-bitmaps: 76build-bitmapsmono:
79 $(SILENT)$(MAKE) -C bitmaps OBJDIR=$(OBJDIR)/bitmaps 77 $(call PRINTS,MAKE in plugins/bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono
80 78
81$(BITMAPLIBS): build-bitmaps 79build-bitmapsnative:
80 $(call PRINTS,MAKE in plugins/bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native
81
82build-bitmapsremotemono:
83 $(call PRINTS,MAKE in plugins/bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono
84
85build-bitmapsremotenative:
86 $(call PRINTS,MAKE in plugins/bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native
87
88$(BITMAPLIBS): $(BUILDDIR)/libplugin%.a: build-%
82 89
83ifndef SIMVER 90ifndef SIMVER
84$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS) 91$(OBJDIR)/%.elf: $(OBJDIR)/%.o $(LINKFILE) $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
85 @echo "LD $(notdir $@)" 92 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
86 $(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,--gc-sections -Wl,-Map,$(OBJDIR)/$*.map
87 93
88$(OBJDIR)/%.rock : $(OBJDIR)/%.elf 94$(OBJDIR)/%.rock : $(OBJDIR)/%.elf
89 @echo "OBJCOPY $(notdir $@)" 95 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
90 $(SILENT)$(OC) -O binary $< $@
91else 96else
92 97
93ifeq ($(SIMVER), x11) 98ifeq ($(SIMVER), x11)
@@ -95,8 +100,7 @@ ifeq ($(SIMVER), x11)
95# This is the X11 simulator version 100# This is the X11 simulator version
96 101
97$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) 102$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
98 @echo "LD $(notdir $@)" 103 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
99 $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
100ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 104ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
101# 'x' must be kept or you'll have "Win32 error 5" 105# 'x' must be kept or you'll have "Win32 error 5"
102# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 106# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -111,8 +115,7 @@ ifeq ($(SIMVER), sdl)
111# This is the SDL simulator version 115# This is the SDL simulator version
112 116
113$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) 117$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
114 @echo "LD $(notdir $@)" 118 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
115 $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lplugin $(LINKBITMAPS) -o $@
116ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 119ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
117# 'x' must be kept or you'll have "Win32 error 5" 120# 'x' must be kept or you'll have "Win32 error 5"
118# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 121# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -128,8 +131,7 @@ DLLTOOLFLAGS = --export-all
128DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 131DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
129 132
130$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS) 133$(OBJDIR)/%.rock : $(OBJDIR)/%.o $(BUILDDIR)/libplugin.a $(BITMAPLIBS)
131 @echo "DLL $(notdir $@)" 134 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
132 $(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $<
133 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \ 135 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(BUILDDIR)/libplugin.a $(BITMAPLIBS) \
134 $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@ 136 $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) -o $@
135ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 137ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
@@ -147,23 +149,19 @@ endif # end of simulator section
147include $(TOOLSDIR)/make.inc 149include $(TOOLSDIR)/make.inc
148 150
149$(BUILDDIR)/libplugin.a: 151$(BUILDDIR)/libplugin.a:
150 @echo "MAKE in plugin/lib"
151 $(SILENT)mkdir -p $(OBJDIR)/lib 152 $(SILENT)mkdir -p $(OBJDIR)/lib
152 $(SILENT)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib 153 $(call PRINTS,MAKE in plugin/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib
153 154
154$(LINKFILE): $(LDS) 155$(LINKFILE): $(LDS)
155 @echo "build $(notdir $@)" 156 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
156 $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@
157 157
158$(SUBDIRS): $(BITMAPLIBS) 158$(SUBDIRS): $(BITMAPLIBS)
159 @echo "MAKE in $@"
160 $(SILENT)mkdir -p $(OBJDIR)/$@ 159 $(SILENT)mkdir -p $(OBJDIR)/$@
161 $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ 160 $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \
162 LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)" 161 LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)"
163 162
164clean: 163clean:
165 @echo "cleaning plugins" 164 $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
166 $(SILENT)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \
167 $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) 165 $(BUILDDIR)/credits.raw $(OBJS) $(DEFS)
168 $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib 166 $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib
169 $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono 167 $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono
diff --git a/apps/plugins/bitmaps/Makefile b/apps/plugins/bitmaps/Makefile
deleted file mode 100644
index abc8fd66bf..0000000000
--- a/apps/plugins/bitmaps/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10ifndef V
11SILENT=@
12endif
13
14all:
15ifneq ($(strip $(BMP2RB_NATIVE)),)
16 @echo "MAKE in plugins/bitmaps/native"
17 $(SILENT)mkdir -p $(OBJDIR)/native
18 @$(MAKE) -C native OBJDIR=$(OBJDIR)/native
19endif
20ifneq ($(strip $(BMP2RB_MONO)),)
21 @echo "MAKE in plugins/bitmaps/mono"
22 $(SILENT)mkdir -p $(OBJDIR)/mono
23 @$(MAKE) -C mono OBJDIR=$(OBJDIR)/mono
24endif
25ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
26 @echo "MAKE in plugins/bitmaps/remote_native"
27 $(SILENT)mkdir -p $(OBJDIR)/remote_native
28 @$(MAKE) -C remote_native OBJDIR=$(OBJDIR)/remote_native
29endif
30ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
31 @echo "MAKE in plugins/bitmaps/remote_mono"
32 $(SILENT)mkdir -p $(OBJDIR)/remote_mono
33 @$(MAKE) -C remote_mono OBJDIR=$(OBJDIR)/remote_mono
34endif
diff --git a/apps/plugins/bitmaps/mono/Makefile b/apps/plugins/bitmaps/mono/Makefile
index 7b7e052117..03eb77a55b 100644
--- a/apps/plugins/bitmaps/mono/Makefile
+++ b/apps/plugins/bitmaps/mono/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning plugins/bitmaps/mono" 29 $(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
31 @rmdir $(OBJDIR) 30 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/plugins/bitmaps/native/Makefile b/apps/plugins/bitmaps/native/Makefile
index d7745ee9e2..071f0d4ba1 100644
--- a/apps/plugins/bitmaps/native/Makefile
+++ b/apps/plugins/bitmaps/native/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning plugins/bitmaps/native" 29 $(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
31 @rmdir $(OBJDIR) 30 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/plugins/bitmaps/remote_mono/Makefile b/apps/plugins/bitmaps/remote_mono/Makefile
index db846e23a7..d3858fa46a 100644
--- a/apps/plugins/bitmaps/remote_mono/Makefile
+++ b/apps/plugins/bitmaps/remote_mono/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning plugins/bitmaps/remotemono" 29 $(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
31 @rmdir $(OBJDIR) 30 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/plugins/bitmaps/remote_native/Makefile b/apps/plugins/bitmaps/remote_native/Makefile
index 405f3fd5af..3802e75781 100644
--- a/apps/plugins/bitmaps/remote_native/Makefile
+++ b/apps/plugins/bitmaps/remote_native/Makefile
@@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/pluginbitmaps
26include $(TOOLSDIR)/makebmp.inc 26include $(TOOLSDIR)/makebmp.inc
27 27
28clean: 28clean:
29 @echo "cleaning plugins/bitmaps/remote_native" 29 $(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
30 @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE)
31 @rmdir $(OBJDIR) 30 @rmdir $(OBJDIR)
32 31
33-include $(DEPFILE) 32-include $(DEPFILE)
diff --git a/apps/plugins/chessbox/Makefile b/apps/plugins/chessbox/Makefile
index 7b3ade24e4..5f1a855082 100644
--- a/apps/plugins/chessbox/Makefile
+++ b/apps/plugins/chessbox/Makefile
@@ -40,13 +40,11 @@ all: $(OUTPUT)
40 40
41ifndef SIMVER 41ifndef SIMVER
42$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 42$(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
43 @echo "LD $(notdir $@)" 43 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
44 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
45 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map 44 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map
46 45
47$(OUTPUT): $(OBJDIR)/chessbox.elf 46$(OUTPUT): $(OBJDIR)/chessbox.elf
48 @echo "OBJCOPY $(notdir $@)" 47 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
49 @$(OC) -O binary $< $@
50else 48else
51 49
52ifeq ($(SIMVER), x11) 50ifeq ($(SIMVER), x11)
@@ -54,8 +52,7 @@ ifeq ($(SIMVER), x11)
54# This is the X11 simulator version 52# This is the X11 simulator version
55 53
56$(OUTPUT): $(OBJS) 54$(OUTPUT): $(OBJS)
57 @echo "LD $(notdir $@)" 55 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
58 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
59ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 56ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
60# 'x' must be kept or you'll have "Win32 error 5" 57# 'x' must be kept or you'll have "Win32 error 5"
61# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 58# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -70,8 +67,7 @@ ifeq ($(SIMVER), sdl)
70# This is the SDL simulator version 67# This is the SDL simulator version
71 68
72$(OUTPUT): $(OBJS) 69$(OUTPUT): $(OBJS)
73 @echo "LD $(notdir $@)" 70 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
74 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
75ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 71ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
76# 'x' must be kept or you'll have "Win32 error 5" 72# 'x' must be kept or you'll have "Win32 error 5"
77# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 73# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -87,9 +83,8 @@ DLLTOOLFLAGS = --export-all
87DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 83DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
88 84
89$(OUTPUT): $(OBJS) 85$(OUTPUT): $(OBJS)
90 @echo "DLL $(notdir $@)" 86 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
91 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 87 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
92 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
93 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 88 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
94ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 89ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
95# 'x' must be kept or you'll have "Win32 error 5" 90# 'x' must be kept or you'll have "Win32 error 5"
@@ -108,13 +103,11 @@ include $(TOOLSDIR)/make.inc
108# MEMORYSIZE should be passed on to this makefile with the chosen memory size 103# MEMORYSIZE should be passed on to this makefile with the chosen memory size
109# given in number of MB 104# given in number of MB
110$(LINKFILE): $(LDS) 105$(LINKFILE): $(LDS)
111 @echo "build $(notdir $@)" 106 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
112 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
113 $(DEFINES) -E -P - >$@ 107 $(DEFINES) -E -P - >$@
114 108
115clean: 109clean:
116 @echo "cleaning chessbox" 110 $(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox
117 @rm -rf $(OBJDIR)/chessbox 111 $(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
118 @rm -f $(OBJDIR)/chessbox.* $(DEPFILE)
119 112
120-include $(DEPFILE) 113-include $(DEPFILE)
diff --git a/apps/plugins/databox/Makefile b/apps/plugins/databox/Makefile
index 818ceb450c..3e026757c4 100644
--- a/apps/plugins/databox/Makefile
+++ b/apps/plugins/databox/Makefile
@@ -31,13 +31,11 @@ all: $(OUTPUT)
31 31
32ifndef SIMVER 32ifndef SIMVER
33$(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE) 33$(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE)
34 @echo "LD $(notdir $@)" 34 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
36 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/databox.map 35 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/databox.map
37 36
38$(OUTPUT): $(OBJDIR)/databox.elf 37$(OUTPUT): $(OBJDIR)/databox.elf
39 @echo "OBJCOPY $(notdir $@)" 38 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
40 @$(OC) -O binary $< $@
41else 39else
42 40
43ifeq ($(SIMVER), x11) 41ifeq ($(SIMVER), x11)
@@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11)
45# This is the X11 simulator version 43# This is the X11 simulator version
46 44
47$(OUTPUT): $(OBJS) 45$(OUTPUT): $(OBJS)
48 @echo "LD $(notdir $@)" 46 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
49 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 47ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 48# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 49# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl)
61# This is the SDL simulator version 58# This is the SDL simulator version
62 59
63$(OUTPUT): $(OBJS) 60$(OUTPUT): $(OBJS)
64 @echo "LD $(notdir $@)" 61 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
65 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 62ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 63# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 64# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -78,9 +74,8 @@ DLLTOOLFLAGS = --export-all
78DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 74DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
79 75
80$(OUTPUT): $(OBJS) 76$(OUTPUT): $(OBJS)
81 @echo "DLL $(notdir $@)" 77 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 78 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
84 $(BUILDDIR)/libplugin.a -o $@ 79 $(BUILDDIR)/libplugin.a -o $@
85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 80ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
86# 'x' must be kept or you'll have "Win32 error 5" 81# 'x' must be kept or you'll have "Win32 error 5"
@@ -99,14 +94,12 @@ include $(TOOLSDIR)/make.inc
99# MEMORYSIZE should be passed on to this makefile with the chosen memory size 94# MEMORYSIZE should be passed on to this makefile with the chosen memory size
100# given in number of MB 95# given in number of MB
101$(LINKFILE): $(LDS) 96$(LINKFILE): $(LDS)
102 @echo "build $(notdir $@)" 97 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
103 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
104 $(DEFINES) -E -P - >$@ 98 $(DEFINES) -E -P - >$@
105 99
106clean: 100clean:
107 @echo "cleaning databox" 101 $(call PRINTS,cleaning databox)rm -rf $(OBJDIR)/databox
108 @rm -rf $(OBJDIR)/databox 102 $(SILENT)rm -f $(OBJDIR)/databox.* $(DEPFILE)
109 @rm -f $(OBJDIR)/databox.* $(DEPFILE)
110 103
111-include $(DEPFILE) 104-include $(DEPFILE)
112 105
diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile
index e1564a773b..f0e858a393 100644
--- a/apps/plugins/doom/Makefile
+++ b/apps/plugins/doom/Makefile
@@ -3,7 +3,10 @@
3# $Id$ 3# $Id$
4# 4#
5# $Log$ 5# $Log$
6# Revision 1.9 2006/10/23 22:33:36 amiconn 6# Revision 1.10 2006/10/27 21:47:55 amiconn
7# Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less.
8#
9# Revision 1.9 2006-10-23 22:33:36 amiconn
7# Consistent style of 'make' messages. Always use ranlib after ar. 10# Consistent style of 'make' messages. Always use ranlib after ar.
8# 11#
9# Revision 1.8 2006-10-23 14:09:28 markun 12# Revision 1.8 2006-10-23 14:09:28 markun
@@ -85,13 +88,11 @@ all: $(OUTPUT)
85 88
86ifndef SIMVER 89ifndef SIMVER
87$(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE) 90$(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE)
88 @echo "LD $(notdir $@)" 91 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
89 @$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\
90 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/doom.map 92 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/doom.map
91 93
92$(OUTPUT): $(OBJDIR)/doom.elf 94$(OUTPUT): $(OBJDIR)/doom.elf
93 @echo "OBJCOPY $(notdir $@)" 95 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
94 @$(OC) -O binary $< $@
95else 96else
96 97
97ifeq ($(SIMVER), x11) 98ifeq ($(SIMVER), x11)
@@ -99,8 +100,7 @@ ifeq ($(SIMVER), x11)
99# This is the X11 simulator version 100# This is the X11 simulator version
100 101
101$(OUTPUT): $(OBJS) 102$(OUTPUT): $(OBJS)
102 @echo "LD $(notdir $@)" 103 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
103 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
104ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 104ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
105# 'x' must be kept or you'll have "Win32 error 5" 105# 'x' must be kept or you'll have "Win32 error 5"
106# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 106# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -115,8 +115,7 @@ ifeq ($(SIMVER), sdl)
115# This is the sdl simulator version 115# This is the sdl simulator version
116 116
117$(OUTPUT): $(OBJS) 117$(OUTPUT): $(OBJS)
118 @echo "LD $(notdir $@)" 118 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
119 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
120ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 119ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
121# 'x' must be kept or you'll have "Win32 error 5" 120# 'x' must be kept or you'll have "Win32 error 5"
122# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 121# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -132,9 +131,8 @@ DLLTOOLFLAGS = --export-all
132DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 131DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
133 132
134$(OUTPUT): $(OBJS) 133$(OUTPUT): $(OBJS)
135 @echo "DLL $(notdir $@)" 134 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
136 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 135 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
137 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
138 $(BUILDDIR)/libplugin.a -o $@ 136 $(BUILDDIR)/libplugin.a -o $@
139ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 137ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
140# 'x' must be kept or you'll have "Win32 error 5" 138# 'x' must be kept or you'll have "Win32 error 5"
@@ -153,13 +151,11 @@ include $(TOOLSDIR)/make.inc
153# MEMORYSIZE should be passed on to this makefile with the chosen memory size 151# MEMORYSIZE should be passed on to this makefile with the chosen memory size
154# given in number of MB 152# given in number of MB
155$(LINKFILE): $(LDS) 153$(LINKFILE): $(LDS)
156 @echo "build $(notdir $@)" 154 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
157 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
158 -E -P - >$@ 155 -E -P - >$@
159 156
160clean: 157clean:
161 @echo "cleaning doom" 158 $(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom
162 @rm -rf $(OBJDIR)/doom 159 $(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE)
163 @rm -f $(OBJDIR)/doom.* $(DEPFILE)
164 160
165-include $(DEPFILE) 161-include $(DEPFILE)
diff --git a/apps/plugins/lib/Makefile b/apps/plugins/lib/Makefile
index 35bf3ac7ac..39f1743f7a 100644
--- a/apps/plugins/lib/Makefile
+++ b/apps/plugins/lib/Makefile
@@ -38,14 +38,12 @@ OUTPUT = $(BUILDDIR)/libplugin.a
38all: $(OUTPUT) 38all: $(OUTPUT)
39 39
40$(OUTPUT): $(OBJS) 40$(OUTPUT): $(OBJS)
41 @echo "AR+RANLIB $(notdir $@)" 41 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
42 @$(AR) ruv $@ $+ >/dev/null 2>&1 42 $(SILENT)$(RANLIB) $@
43 @$(RANLIB) $@
44 43
45include $(TOOLSDIR)/make.inc 44include $(TOOLSDIR)/make.inc
46 45
47clean: 46clean:
48 @echo "cleaning lib" 47 $(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
49 @rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
50 48
51-include $(DEPFILE) 49-include $(DEPFILE)
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile
index 82782b737c..fd19a6da9c 100644
--- a/apps/plugins/mpegplayer/Makefile
+++ b/apps/plugins/mpegplayer/Makefile
@@ -34,13 +34,11 @@ all: $(OUTPUT)
34 34
35ifndef SIMVER 35ifndef SIMVER
36$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) 36$(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE)
37 @echo "LD $(notdir $@)" 37 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
38 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
39 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map 38 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map
40 39
41$(OUTPUT): $(OBJDIR)/mpegplayer.elf 40$(OUTPUT): $(OBJDIR)/mpegplayer.elf
42 @echo "OBJCOPY $(notdir $@)" 41 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
43 @$(OC) -O binary $< $@
44else 42else
45 43
46ifeq ($(SIMVER), x11) 44ifeq ($(SIMVER), x11)
@@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11)
48# This is the X11 simulator version 46# This is the X11 simulator version
49 47
50$(OUTPUT): $(OBJS) 48$(OUTPUT): $(OBJS)
51 @echo "LD $(notdir $@)" 49 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
52 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
53ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
54# 'x' must be kept or you'll have "Win32 error 5" 51# 'x' must be kept or you'll have "Win32 error 5"
55# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl)
64# This is the SDL simulator version 61# This is the SDL simulator version
65 62
66$(OUTPUT): $(OBJS) 63$(OUTPUT): $(OBJS)
67 @echo "LD $(notdir $@)" 64 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
68 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
69ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 65ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
70# 'x' must be kept or you'll have "Win32 error 5" 66# 'x' must be kept or you'll have "Win32 error 5"
71# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 67# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -81,9 +77,8 @@ DLLTOOLFLAGS = --export-all
81DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 77DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
82 78
83$(OUTPUT): $(OBJS) 79$(OUTPUT): $(OBJS)
84 @echo "DLL $(notdir $@)" 80 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
85 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 81 $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
86 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
87 $(BUILDDIR)/libplugin.a -o $@ 82 $(BUILDDIR)/libplugin.a -o $@
88ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 83ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
89# 'x' must be kept or you'll have "Win32 error 5" 84# 'x' must be kept or you'll have "Win32 error 5"
@@ -102,14 +97,12 @@ include $(TOOLSDIR)/make.inc
102# MEMORYSIZE should be passed on to this makefile with the chosen memory size 97# MEMORYSIZE should be passed on to this makefile with the chosen memory size
103# given in number of MB 98# given in number of MB
104$(LINKFILE): $(LDS) 99$(LINKFILE): $(LDS)
105 @echo "build $(notdir $@)" 100 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
106 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
107 $(DEFINES) -E -P - >$@ 101 $(DEFINES) -E -P - >$@
108 102
109clean: 103clean:
110 @echo "cleaning mpegplayer" 104 $(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer
111 @rm -rf $(OBJDIR)/mpegplayer 105 $(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
112 @rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE)
113 106
114-include $(DEPFILE) 107-include $(DEPFILE)
115 108
diff --git a/apps/plugins/pacbox/Makefile b/apps/plugins/pacbox/Makefile
index 7cc8da02a4..c88d8ae4ab 100644
--- a/apps/plugins/pacbox/Makefile
+++ b/apps/plugins/pacbox/Makefile
@@ -34,13 +34,11 @@ all: $(OUTPUT)
34 34
35ifndef SIMVER 35ifndef SIMVER
36$(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE) 36$(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE)
37 @echo "LD $(notdir $@)" 37 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
38 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
39 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map 38 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map
40 39
41$(OUTPUT): $(OBJDIR)/pacbox.elf 40$(OUTPUT): $(OBJDIR)/pacbox.elf
42 @echo "OBJCOPY $(notdir $@)" 41 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
43 @$(OC) -O binary $< $@
44else 42else
45 43
46ifeq ($(SIMVER), x11) 44ifeq ($(SIMVER), x11)
@@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11)
48# This is the X11 simulator version 46# This is the X11 simulator version
49 47
50$(OUTPUT): $(OBJS) 48$(OUTPUT): $(OBJS)
51 @echo "LD $(notdir $@)" 49 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
52 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
53ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
54# 'x' must be kept or you'll have "Win32 error 5" 51# 'x' must be kept or you'll have "Win32 error 5"
55# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl)
64# This is the SDL simulator version 61# This is the SDL simulator version
65 62
66$(OUTPUT): $(OBJS) 63$(OUTPUT): $(OBJS)
67 @echo "LD $(notdir $@)" 64 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
68 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
69ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 65ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
70# 'x' must be kept or you'll have "Win32 error 5" 66# 'x' must be kept or you'll have "Win32 error 5"
71# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 67# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -81,9 +77,8 @@ DLLTOOLFLAGS = --export-all
81DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 77DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
82 78
83$(OUTPUT): $(OBJS) 79$(OUTPUT): $(OBJS)
84 @echo "DLL $(notdir $@)" 80 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
85 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 81 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
86 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
87 $(BUILDDIR)/libplugin.a -o $@ 82 $(BUILDDIR)/libplugin.a -o $@
88ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 83ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
89# 'x' must be kept or you'll have "Win32 error 5" 84# 'x' must be kept or you'll have "Win32 error 5"
@@ -102,14 +97,12 @@ include $(TOOLSDIR)/make.inc
102# MEMORYSIZE should be passed on to this makefile with the chosen memory size 97# MEMORYSIZE should be passed on to this makefile with the chosen memory size
103# given in number of MB 98# given in number of MB
104$(LINKFILE): $(LDS) 99$(LINKFILE): $(LDS)
105 @echo "build $(notdir $@)" 100 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
106 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
107 $(DEFINES) -E -P - >$@ 101 $(DEFINES) -E -P - >$@
108 102
109clean: 103clean:
110 @echo "cleaning pacbox" 104 $(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox
111 @rm -rf $(OBJDIR)/pacbox 105 $(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE)
112 @rm -f $(OBJDIR)/pacbox.* $(DEPFILE)
113 106
114-include $(DEPFILE) 107-include $(DEPFILE)
115 108
diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile
index 275d2ffd9b..e4c62666fb 100644
--- a/apps/plugins/rockboy/Makefile
+++ b/apps/plugins/rockboy/Makefile
@@ -47,13 +47,11 @@ all: $(OUTPUT)
47 47
48ifndef SIMVER 48ifndef SIMVER
49$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) 49$(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE)
50 @echo "LD $(notdir $@)" 50 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
51 @$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \
52 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map 51 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map
53 52
54$(OUTPUT): $(OBJDIR)/rockboy.elf 53$(OUTPUT): $(OBJDIR)/rockboy.elf
55 @echo "OBJCOPY $(notdir $@)" 54 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
56 @$(OC) -O binary $< $@
57else 55else
58 56
59ifeq ($(SIMVER), x11) 57ifeq ($(SIMVER), x11)
@@ -61,8 +59,7 @@ ifeq ($(SIMVER), x11)
61# This is the X11 simulator version 59# This is the X11 simulator version
62 60
63$(OUTPUT): $(OBJS) 61$(OUTPUT): $(OBJS)
64 @echo "LD $(notdir $@)" 62 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
65 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 63ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 64# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 65# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -77,8 +74,7 @@ ifeq ($(SIMVER), sdl)
77# This is the sdl simulator version 74# This is the sdl simulator version
78 75
79$(OUTPUT): $(OBJS) 76$(OUTPUT): $(OBJS)
80 @echo "LD $(notdir $@)" 77 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
81 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
82ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 78ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
83# 'x' must be kept or you'll have "Win32 error 5" 79# 'x' must be kept or you'll have "Win32 error 5"
84# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 80# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -94,9 +90,8 @@ DLLTOOLFLAGS = --export-all
94DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 90DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
95 91
96$(OUTPUT): $(OBJS) 92$(OUTPUT): $(OBJS)
97 @echo "DLL $(notdir $@)" 93 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
98 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 94 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
99 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
100 $(BUILDDIR)/libplugin.a -o $@ 95 $(BUILDDIR)/libplugin.a -o $@
101ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 96ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
102# 'x' must be kept or you'll have "Win32 error 5" 97# 'x' must be kept or you'll have "Win32 error 5"
@@ -115,14 +110,12 @@ include $(TOOLSDIR)/make.inc
115# MEMORYSIZE should be passed on to this makefile with the chosen memory size 110# MEMORYSIZE should be passed on to this makefile with the chosen memory size
116# given in number of MB 111# given in number of MB
117$(LINKFILE): $(LDS) 112$(LINKFILE): $(LDS)
118 @echo "build $(notdir $@)" 113 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
119 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \
120 -E -P - >$@ 114 -E -P - >$@
121 115
122clean: 116clean:
123 @echo "cleaning rockboy" 117 $(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy
124 @rm -rf $(OBJDIR)/rockboy 118 $(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE)
125 @rm -f $(OBJDIR)/rockboy.* $(DEPFILE)
126 119
127-include $(DEPFILE) 120-include $(DEPFILE)
128 121
diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile
index beadac7ea1..1c71c9b30d 100644
--- a/apps/plugins/searchengine/Makefile
+++ b/apps/plugins/searchengine/Makefile
@@ -31,13 +31,11 @@ all: $(OUTPUT)
31 31
32ifndef SIMVER 32ifndef SIMVER
33$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) 33$(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE)
34 @echo "LD $(notdir $@)" 34 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
35 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
36 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map 35 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map
37 36
38$(OUTPUT): $(OBJDIR)/searchengine.elf 37$(OUTPUT): $(OBJDIR)/searchengine.elf
39 @echo "OBJCOPY $(notdir $@)" 38 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
40 @$(OC) -O binary $< $@
41else 39else
42 40
43ifeq ($(SIMVER), x11) 41ifeq ($(SIMVER), x11)
@@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11)
45# This is the X11 simulator version 43# This is the X11 simulator version
46 44
47$(OUTPUT): $(OBJS) 45$(OUTPUT): $(OBJS)
48 @echo "LD $(notdir $@)" 46 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
49 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
50ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 47ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
51# 'x' must be kept or you'll have "Win32 error 5" 48# 'x' must be kept or you'll have "Win32 error 5"
52# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 49# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl)
61# This is the SDL simulator version 58# This is the SDL simulator version
62 59
63$(OUTPUT): $(OBJS) 60$(OUTPUT): $(OBJS)
64 @echo "LD $(notdir $@)" 61 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
65 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
66ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 62ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
67# 'x' must be kept or you'll have "Win32 error 5" 63# 'x' must be kept or you'll have "Win32 error 5"
68# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 64# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -78,9 +74,8 @@ DLLTOOLFLAGS = --export-all
78DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 74DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
79 75
80$(OUTPUT): $(OBJS) 76$(OUTPUT): $(OBJS)
81 @echo "DLL $(notdir $@)" 77 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
82 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 78 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
83 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
84 $(BUILDDIR)/libplugin.a -o $@ 79 $(BUILDDIR)/libplugin.a -o $@
85ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 80ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
86# 'x' must be kept or you'll have "Win32 error 5" 81# 'x' must be kept or you'll have "Win32 error 5"
@@ -99,14 +94,12 @@ include $(TOOLSDIR)/make.inc
99# MEMORYSIZE should be passed on to this makefile with the chosen memory size 94# MEMORYSIZE should be passed on to this makefile with the chosen memory size
100# given in number of MB 95# given in number of MB
101$(LINKFILE): $(LDS) 96$(LINKFILE): $(LDS)
102 @echo "build $(notdir $@)" 97 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
103 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
104 $(DEFINES) -E -P - >$@ 98 $(DEFINES) -E -P - >$@
105 99
106clean: 100clean:
107 @echo "cleaning searchengine" 101 $(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine
108 @rm -rf $(OBJDIR)/searchengine 102 $(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE)
109 @rm -f $(OBJDIR)/searchengine.* $(DEPFILE)
110 103
111-include $(DEPFILE) 104-include $(DEPFILE)
112 105
diff --git a/apps/plugins/sudoku/Makefile b/apps/plugins/sudoku/Makefile
index 7093de93c0..debd9fecc2 100644
--- a/apps/plugins/sudoku/Makefile
+++ b/apps/plugins/sudoku/Makefile
@@ -38,13 +38,11 @@ all: $(OUTPUT)
38 38
39ifndef SIMVER 39ifndef SIMVER
40$(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) 40$(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
41 @echo "LD $(notdir $@)" 41 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
42 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
43 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map 42 $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map
44 43
45$(OUTPUT): $(OBJDIR)/sudoku.elf 44$(OUTPUT): $(OBJDIR)/sudoku.elf
46 @echo "OBJCOPY $(notdir $@)" 45 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
47 @$(OC) -O binary $< $@
48else 46else
49 47
50ifeq ($(SIMVER), x11) 48ifeq ($(SIMVER), x11)
@@ -52,8 +50,7 @@ ifeq ($(SIMVER), x11)
52# This is the X11 simulator version 50# This is the X11 simulator version
53 51
54$(OUTPUT): $(OBJS) 52$(OUTPUT): $(OBJS)
55 @echo "LD $(notdir $@)" 53 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
56 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
57ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 54ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
58# 'x' must be kept or you'll have "Win32 error 5" 55# 'x' must be kept or you'll have "Win32 error 5"
59# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 56# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -68,8 +65,7 @@ ifeq ($(SIMVER), sdl)
68# This is the SDL simulator version 65# This is the SDL simulator version
69 66
70$(OUTPUT): $(OBJS) 67$(OUTPUT): $(OBJS)
71 @echo "LD $(notdir $@)" 68 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
72 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
73ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 69ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
74# 'x' must be kept or you'll have "Win32 error 5" 70# 'x' must be kept or you'll have "Win32 error 5"
75# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 71# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -85,9 +81,8 @@ DLLTOOLFLAGS = --export-all
85DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin 81DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
86 82
87$(OUTPUT): $(OBJS) 83$(OUTPUT): $(OBJS)
88 @echo "DLL $(notdir $@)" 84 $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
89 @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) 85 $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
90 @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
91 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ 86 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
92ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 87ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
93# 'x' must be kept or you'll have "Win32 error 5" 88# 'x' must be kept or you'll have "Win32 error 5"
@@ -106,13 +101,11 @@ include $(TOOLSDIR)/make.inc
106# MEMORYSIZE should be passed on to this makefile with the chosen memory size 101# MEMORYSIZE should be passed on to this makefile with the chosen memory size
107# given in number of MB 102# given in number of MB
108$(LINKFILE): $(LDS) 103$(LINKFILE): $(LDS)
109 @echo "build $(notdir $@)" 104 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
110 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
111 $(DEFINES) -E -P - >$@ 105 $(DEFINES) -E -P - >$@
112 106
113clean: 107clean:
114 @echo "cleaning sudoku" 108 $(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku
115 @rm -rf $(OBJDIR)/sudoku 109 $(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE)
116 @rm -f $(OBJDIR)/sudoku.* $(DEPFILE)
117 110
118-include $(DEPFILE) 111-include $(DEPFILE)
diff --git a/apps/plugins/zxbox/Makefile b/apps/plugins/zxbox/Makefile
index 8f26ce6f40..3ca5d300f1 100644
--- a/apps/plugins/zxbox/Makefile
+++ b/apps/plugins/zxbox/Makefile
@@ -43,13 +43,11 @@ all: $(OUTPUT)
43 43
44ifndef SIMVER 44ifndef SIMVER
45$(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE) 45$(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE)
46 @echo "LD $(notdir $@)" 46 $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
47 @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
48 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/zxbox.map 47 -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/zxbox.map
49 48
50$(OUTPUT): $(OBJDIR)/zxbox.elf 49$(OUTPUT): $(OBJDIR)/zxbox.elf
51 @echo "OBJCOPY $(notdir $@)" 50 $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
52 @$(OC) -O binary $< $@
53else 51else
54 52
55ifeq ($(SIMVER), sdl) 53ifeq ($(SIMVER), sdl)
@@ -57,8 +55,7 @@ ifeq ($(SIMVER), sdl)
57# This is the SDL simulator version 55# This is the SDL simulator version
58 56
59$(OUTPUT): $(OBJS) 57$(OUTPUT): $(OBJS)
60 @echo "LD $(notdir $@)" 58 $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
61 @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@
62ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) 59ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
63# 'x' must be kept or you'll have "Win32 error 5" 60# 'x' must be kept or you'll have "Win32 error 5"
64# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 61# $ fgrep 5 /usr/include/w32api/winerror.h | head -1
@@ -76,14 +73,12 @@ include $(TOOLSDIR)/make.inc
76# MEMORYSIZE should be passed on to this makefile with the chosen memory size 73# MEMORYSIZE should be passed on to this makefile with the chosen memory size
77# given in number of MB 74# given in number of MB
78$(LINKFILE): $(LDS) 75$(LINKFILE): $(LDS)
79 @echo "build $(notdir $@)" 76 $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
80 @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
81 $(DEFINES) -E -P - >$@ 77 $(DEFINES) -E -P - >$@
82 78
83clean: 79clean:
84 @echo "cleaning zxbox" 80 $(call PRINTS,cleaning zxbox)rm -rf $(OBJDIR)/zxbox
85 @rm -rf $(OBJDIR)/zxbox 81 $(SILENT)rm -f $(OBJDIR)/zxbox.* $(DEPFILE)
86 @rm -f $(OBJDIR)/zxbox.* $(DEPFILE)
87 82
88-include $(DEPFILE) 83-include $(DEPFILE)
89 84