From a796260a6b9929f6aca844b4a788a2f55ef60d4b Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 27 Oct 2006 21:48:06 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11369 a1c6a512-1295-4272-9138-f99709370657 --- apps/Makefile | 90 ++++++++++----------- apps/bitmaps/Makefile | 34 -------- apps/bitmaps/mono/Makefile | 7 +- apps/bitmaps/native/Makefile | 5 +- apps/bitmaps/remote_mono/Makefile | 5 +- apps/bitmaps/remote_native/Makefile | 5 +- apps/codecs/Makefile | 54 +++++-------- apps/codecs/Tremor/Makefile | 8 +- apps/codecs/lib/Makefile | 8 +- apps/codecs/libFLAC/Makefile | 13 ++- apps/codecs/liba52/Makefile | 8 +- apps/codecs/libalac/Makefile | 8 +- apps/codecs/libfaad/Makefile | 8 +- apps/codecs/libffmpegFLAC/Makefile | 8 +- apps/codecs/libm4a/Makefile | 8 +- apps/codecs/libmad/Makefile | 8 +- apps/codecs/libmusepack/Makefile | 8 +- apps/plugins/Makefile | 48 ++++++----- apps/plugins/bitmaps/Makefile | 34 -------- apps/plugins/bitmaps/mono/Makefile | 3 +- apps/plugins/bitmaps/native/Makefile | 3 +- apps/plugins/bitmaps/remote_mono/Makefile | 3 +- apps/plugins/bitmaps/remote_native/Makefile | 3 +- apps/plugins/chessbox/Makefile | 25 +++--- apps/plugins/databox/Makefile | 25 +++--- apps/plugins/doom/Makefile | 30 +++---- apps/plugins/lib/Makefile | 8 +- apps/plugins/mpegplayer/Makefile | 25 +++--- apps/plugins/pacbox/Makefile | 25 +++--- apps/plugins/rockboy/Makefile | 25 +++--- apps/plugins/searchengine/Makefile | 25 +++--- apps/plugins/sudoku/Makefile | 25 +++--- apps/plugins/zxbox/Makefile | 17 ++-- firmware/Makefile | 15 ++-- firmware/decompressor/Makefile | 22 ++--- tools/configure | 4 +- tools/make.inc | 7 +- tools/makebmp.inc | 12 ++- uisimulator/common/Makefile | 8 +- uisimulator/sdl/Makefile | 13 ++- 40 files changed, 245 insertions(+), 445 deletions(-) delete mode 100644 apps/bitmaps/Makefile delete mode 100644 apps/plugins/bitmaps/Makefile diff --git a/apps/Makefile b/apps/Makefile index a6c75848d3..00612fa499 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -91,49 +91,52 @@ $(DEPFILE): $(BITMAPLIBS) dep: $(DEPFILE) build-codecs: - @$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib - @$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs + $(SILENT)$(MAKE) -C codecs/lib OBJDIR=$(OBJDIR)/codecs/lib + $(SILENT)$(MAKE) -C codecs OBJDIR=$(OBJDIR)/codecs -build-bitmaps: - @$(MAKE) -C bitmaps OBJDIR=$(OBJDIR)/bitmaps +build-bitmapsmono: + $(call PRINTS,MAKE in bitmaps/mono)$(MAKE) -C bitmaps/mono OBJDIR=$(OBJDIR)/bitmaps/mono -$(BITMAPLIBS): build-bitmaps +build-bitmapsnative: + $(call PRINTS,MAKE in bitmaps/native)$(MAKE) -C bitmaps/native OBJDIR=$(OBJDIR)/bitmaps/native + +build-bitmapsremotemono: + $(call PRINTS,MAKE in bitmaps/remote_mono)$(MAKE) -C bitmaps/remote_mono OBJDIR=$(OBJDIR)/bitmaps/remote_mono + +build-bitmapsremotenative: + $(call PRINTS,MAKE in bitmaps/remote_native)$(MAKE) -C bitmaps/remote_native OBJDIR=$(OBJDIR)/bitmaps/remote_native + +$(BITMAPLIBS): $(BUILDDIR)/lib%.a: build-% rocks: build-codecs - @$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib - @$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins + $(SILENT)$(MAKE) -C plugins/lib OBJDIR=$(OBJDIR)/plugins/lib + $(SILENT)$(MAKE) -C plugins OBJDIR=$(OBJDIR)/plugins $(LINKFILE): $(LDS) - @echo "Build $(notdir $@)" - @cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ + $(call PRINTS,Build $(@F))cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ $(LINKROM): $(ROMLDS) - @echo "Build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ + $(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ $(MAXOUTFILE): - @echo '#include "config.h"' > $(MAXINFILE) - @echo "ROM_START" >> $(MAXINFILE) - @cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE) - @rm $(MAXINFILE) + $(SILENT)echo '#include "config.h"' > $(MAXINFILE) + $(SILENT)echo "ROM_START" >> $(MAXINFILE) + $(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE) + $(SILENT)rm $(MAXINFILE) $(OBJDIR)/rombox.elf : $(OBJS) $(LINKROM) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lgcc $(LINKBITMAPS) -L$(BUILDDIR)/firmware -T$(LINKROM) -Wl,-Map,$(OBJDIR)/rombox.map + $(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 ifndef SIMVER $(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(BITMAPLIBS) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map + $(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 $(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ $(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin $(TOOLSDIR)/sh2d -sh1 $< > $@ @@ -145,8 +148,7 @@ $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin # instead. # $(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) - @echo "Build firmware file" - $(SILENT)($(MKFIRMWARE) $< $@; \ + $(call PRINTS,Build firmware file)($(MKFIRMWARE) $< $@; \ stat=$$?; \ if test -n "$(FLASHFILE)"; then \ if test "$$stat" -ne 0; then \ @@ -174,50 +176,44 @@ endif $(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \ $(BUILDDIR)/libcomsim.a $(LIBROCKBOX) $(BITMAPLIBS) - @echo "LD $(BINARY)" - $(SILENT)$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP) + $(call PRINTS,LD $(BINARY))$(CC) $(GCCOPTS) -o $@ $(OBJS) -L$(BUILDDIR) -lrockbox -lsim -lcomsim $(LINKBITMAPS) $(LDOPTS) $(EXTRAOBJ) $(SIMULATOR_MAP) endif $(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin - $(SILENT)(echo "UCLPACK rockbox" ; \ - $(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;) + $(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1 $(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE) - $(SILENT)(echo "UCLPACK rombox" ; \ - $(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \ + $(call PRINTS,UCLPACK rombox)$(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \ perl $(TOOLSDIR)/romsizetest.pl `cat $(MAXOUTFILE)` $<; \ if test $$? -ne 0; then \ echo "removing UCL file again, making it a fake one"; \ echo "fake" > $@; \ - fi) + fi include $(TOOLSDIR)/make.inc $(OBJDIR)/lang.o: lang/$(LANGUAGE).lang - @echo "GENLANG" @mkdir -p $(dir $@) - $(SILENT)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $< - @echo "CC lang.c" - @$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ + $(call PRINTS,GENLANG)perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(ARCHOS) $< + $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ clean: - @echo "cleaning apps" - @-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \ + $(call PRINTS,cleaning apps)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/rockbox.asm \ $(OBJDIR)/rockbox.bin $(OBJDIR)/rockbox.elf $(OBJDIR)/*.map \ $(OBJDIR)/lang.o $(OBJDIR)/build.lang $(BUILDDIR)/lang.[ch] \ $(LINKFILE) $(BUILDDIR)/rockbox.ucl $(LINKROM) \ $(BUILDDIR)/rombox.ucl $(OBJDIR)/rombox.bin $(OBJDIR)/rombox.elf \ $(MAXOUTFILE) $(DEPFILE) - @$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono - @$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native - @$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono - @$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native - @$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins - @$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs - @rm -rf $(OBJDIR)/recorder $(OBJDIR)/player - @rm -rf $(BUILDDIR)/bitmaps + $(SILENT)$(MAKE) -C bitmaps/mono clean OBJDIR=$(OBJDIR)/bitmaps/mono + $(SILENT)$(MAKE) -C bitmaps/native clean OBJDIR=$(OBJDIR)/bitmaps/native + $(SILENT)$(MAKE) -C bitmaps/remote_mono clean OBJDIR=$(OBJDIR)/bitmaps/remote_mono + $(SILENT)$(MAKE) -C bitmaps/remote_native clean OBJDIR=$(OBJDIR)/bitmaps/remote_native + $(SILENT)$(MAKE) -C plugins clean OBJDIR=$(OBJDIR)/plugins + $(SILENT)$(MAKE) -C codecs clean OBJDIR=$(OBJDIR)/codecs + $(SILENT)rm -rf $(OBJDIR)/recorder $(OBJDIR)/player + $(SILENT)rm -rf $(BUILDDIR)/bitmaps ifdef SIMVER - @$(MAKE) -C $(SIMDIR) clean + $(SILENT)$(MAKE) -C $(SIMDIR) clean endif ifneq ($(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 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -ifndef V -SILENT=@ -endif - -all: -ifneq ($(strip $(BMP2RB_NATIVE)),) - @echo "MAKE in bitmaps/native" - $(SILENT)mkdir -p $(OBJDIR)/native - @$(MAKE) -C native OBJDIR=$(OBJDIR)/native -endif -ifneq ($(strip $(BMP2RB_MONO)),) - @echo "MAKE in bitmaps/mono" - $(SILENT)mkdir -p $(OBJDIR)/mono - @$(MAKE) -C mono OBJDIR=$(OBJDIR)/mono -endif -ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) - @echo "MAKE in bitmaps/remote_native" - $(SILENT)mkdir -p $(OBJDIR)/remote_native - @$(MAKE) -C remote_native OBJDIR=$(OBJDIR)/remote_native -endif -ifneq ($(strip $(BMP2RB_REMOTEMONO)),) - @echo "MAKE in bitmaps/remote_mono" - $(SILENT)mkdir -p $(OBJDIR)/remote_mono - @$(MAKE) -C remote_mono OBJDIR=$(OBJDIR)/remote_mono -endif 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 @@ # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ # \/ \/ \/ \/ \/ # $Id$ -# +# INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ -I$(OBJDIR) @@ -26,8 +26,7 @@ BMPINCDIR = $(BUILDDIR)/bitmaps include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning bitmaps/mono" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) + $(call PRINTS,cleaning bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(SILENT)rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning bitmaps/native" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) + $(call PRINTS,cleaning bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(SILENT)rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning bitmaps/remotemono" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) + $(call PRINTS,cleaning bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(SILENT)rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning bitmaps/remote_native" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) + $(call PRINTS,cleaning bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(SILENT)rmdir $(OBJDIR) -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 $(OBJDIR)/wavpack_enc.elf: $(OBJDIR)/wavpack_enc.o $(BUILDDIR)/libwavpack.a $(OBJDIR)/%.elf: - @echo "LD $(notdir $@)" - $(SILENT)$(CC) $(GCCOPTS) -O -nostdlib -o $@ $^ -L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) -Wl,-Map,$(OBJDIR)/$*.map + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $^ -L$(BUILDDIR) -lcodec -lgcc -T$(LINKCODEC) -Wl,-Map,$(OBJDIR)/$*.map $(OBJDIR)/%.codec : $(OBJDIR)/%.elf - @echo "OBJCOPY $(notdir $@)" - $(SILENT)$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -79,8 +77,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) - @echo "LD $(notdir $@)" - $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -95,8 +92,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) - @echo "LD $(notdir $@)" - $(SILENT)$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $< -L$(BUILDDIR) $(CODECLIBS) -lcodec -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -112,8 +108,7 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OBJDIR)/%.codec : $(OBJDIR)/%.o $(BUILDDIR)/libcodec.a $(OUTPUT) - @echo "DLL $(notdir $@)" - $(SILENT)$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< \ $(BUILDDIR)/libcodec.a $(patsubst -l%,$(BUILDDIR)/lib%.a,$(CODECLIBS)) \ -o $@ @@ -132,85 +127,72 @@ endif # end of simulator section include $(TOOLSDIR)/make.inc $(BUILDDIR)/libcodec.a: - @echo "MAKE in codecs/lib" $(SILENT)mkdir -p $(OBJDIR)/lib - $(SILENT)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib + $(call PRINTS,MAKE in codecs/lib)$(MAKE) -C lib OBJDIR=$(OBJDIR)/lib $(LINKCODEC): $(LDS) - @echo "build $(notdir $@)" - $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) -DCODEC $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ $(BUILDDIR)/libmad.a: libmad libmad: - @echo "MAKE in libmad" $(SILENT)mkdir -p $(OBJDIR)/libmad - $(SILENT)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a + $(call PRINTS,MAKE in libmad)$(MAKE) -C libmad OBJDIR=$(OBJDIR)/libmad OUTPUT=$(BUILDDIR)/libmad.a $(BUILDDIR)/liba52.a: liba52 liba52: - @echo "MAKE in liba52" $(SILENT)mkdir -p $(OBJDIR)/liba52 - $(SILENT)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a + $(call PRINTS,MAKE in liba52)$(MAKE) -C liba52 OBJDIR=$(OBJDIR)/liba52 OUTPUT=$(BUILDDIR)/liba52.a $(BUILDDIR)/libffmpegFLAC.a: libffmpegFLAC libffmpegFLAC: - @echo "MAKE in libffmpegFLAC" $(SILENT)mkdir -p $(OBJDIR)/libffmpegFLAC - $(SILENT)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a + $(call PRINTS,MAKE in libffmpegFLAC)$(MAKE) -C libffmpegFLAC OBJDIR=$(OBJDIR)/libffmpegFLAC OUTPUT=$(BUILDDIR)/libffmpegFLAC.a $(BUILDDIR)/libTremor.a: libTremor libTremor: - @echo "MAKE in Tremor" $(SILENT)mkdir -p $(OBJDIR)/Tremor - $(SILENT)$(MAKE) -C Tremor OBJDIR=$(OBJDIR)/Tremor OUTPUT=$(BUILDDIR)/libTremor.a + $(call PRINTS,MAKE in Tremor)$(MAKE) -C Tremor OBJDIR=$(OBJDIR)/Tremor OUTPUT=$(BUILDDIR)/libTremor.a $(BUILDDIR)/libwavpack.a: libwavpack libwavpack: - @echo "MAKE in libwavpack" $(SILENT)mkdir -p $(OBJDIR)/libwavpack - $(SILENT)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a + $(call PRINTS,MAKE in libwavpack)$(MAKE) -C libwavpack OBJDIR=$(OBJDIR)/libwavpack OUTPUT=$(BUILDDIR)/libwavpack.a dumb: - @echo "MAKE in dumb" $(SILENT)mkdir -p $(OBJDIR)/dumb - $(SILENT)$(MAKE) -C dumb OBJDIR=$(OBJDIR)/dumb LIBDIR=$(BUILDDIR) OFLAGS="$(CFLAGS)" + $(call PRINTS,MAKE in dumb)$(MAKE) -C dumb OBJDIR=$(OBJDIR)/dumb LIBDIR=$(BUILDDIR) OFLAGS="$(CFLAGS)" $(BUILDDIR)/libmusepack.a: libmusepack libmusepack: - @echo "MAKE in libmusepack" $(SILENT)mkdir -p $(OBJDIR)/libmusepack - $(SILENT)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a + $(call PRINTS,MAKE in libmusepack)$(MAKE) -C libmusepack OBJDIR=$(OBJDIR)/libmusepack OUTPUT=$(BUILDDIR)/libmusepack.a $(BUILDDIR)/libalac.a: libalac libalac: - @echo "MAKE in libalac" $(SILENT)mkdir -p $(OBJDIR)/libalac - $(SILENT)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a + $(call PRINTS,MAKE in libalac)$(MAKE) -C libalac OBJDIR=$(OBJDIR)/libalac OUTPUT=$(BUILDDIR)/libalac.a $(BUILDDIR)/libm4a.a: libm4a libm4a: - @echo "MAKE in libm4a" $(SILENT)mkdir -p $(OBJDIR)/libm4a - $(SILENT)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a + $(call PRINTS,MAKE in libm4a)$(MAKE) -C libm4a OBJDIR=$(OBJDIR)/libm4a OUTPUT=$(BUILDDIR)/libm4a.a $(BUILDDIR)/libfaad.a: libfaad libfaad: - @echo "MAKE in libfaad" $(SILENT)mkdir -p $(OBJDIR)/libfaad - $(SILENT)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a + $(call PRINTS,MAKE in libfaad)$(MAKE) -C libfaad OBJDIR=$(OBJDIR)/libfaad OUTPUT=$(BUILDDIR)/libfaad.a clean: - @echo "cleaning codecs" - $(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 + $(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 $(SILENT)$(MAKE) -C libmad clean OBJDIR=$(OBJDIR)/libmad $(SILENT)$(MAKE) -C liba52 clean OBJDIR=$(OBJDIR)/liba52 $(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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning Tremor" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning Tremor)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning codecs/lib" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning codecs/lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) -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 all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ $(OBJDIR)/libFLAC/%.o: $(APPSDIR)/codecs/libFLAC/%.c - @mkdir -p $(OBJDIR)/libFLAC - @echo "(libFLAC) CC $<" - @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libFLAC/include/FLAC $< -o $@ + $(SILENT)mkdir -p $(OBJDIR)/libFLAC + $(call PRINTS,CC $(/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning liba52" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning liba52)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libalac" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libalac)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libfaad" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libfaad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libffmpegFLAC" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libffmpegFLAC)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libm4a" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libm4a)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libmad" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libmad)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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 = all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning libmusepack" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning libmusepack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) ifneq ($(MAKECMDGOALS),clean) -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) dep: $(DEPFILE) $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS - @echo "create credits.raw" - $(SILENT)perl credits.pl < $< > $@ + $(call PRINTS,create credits.raw)perl credits.pl < $< > $@ $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw $(SILENT)mkdir -p $(dir $@) - @echo "CC $<" - $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ + $(call PRINTS,CC $($@ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P - >$@ $(SUBDIRS): $(BITMAPLIBS) - @echo "MAKE in $@" $(SILENT)mkdir -p $(OBJDIR)/$@ - $(SILENT)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ + $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)" clean: - @echo "cleaning plugins" - $(SILENT)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ + $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ $(BUILDDIR)/credits.raw $(OBJS) $(DEFS) $(SILENT)$(MAKE) -C lib clean OBJDIR=$(OBJDIR)/lib $(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 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -ifndef V -SILENT=@ -endif - -all: -ifneq ($(strip $(BMP2RB_NATIVE)),) - @echo "MAKE in plugins/bitmaps/native" - $(SILENT)mkdir -p $(OBJDIR)/native - @$(MAKE) -C native OBJDIR=$(OBJDIR)/native -endif -ifneq ($(strip $(BMP2RB_MONO)),) - @echo "MAKE in plugins/bitmaps/mono" - $(SILENT)mkdir -p $(OBJDIR)/mono - @$(MAKE) -C mono OBJDIR=$(OBJDIR)/mono -endif -ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) - @echo "MAKE in plugins/bitmaps/remote_native" - $(SILENT)mkdir -p $(OBJDIR)/remote_native - @$(MAKE) -C remote_native OBJDIR=$(OBJDIR)/remote_native -endif -ifneq ($(strip $(BMP2RB_REMOTEMONO)),) - @echo "MAKE in plugins/bitmaps/remote_mono" - $(SILENT)mkdir -p $(OBJDIR)/remote_mono - @$(MAKE) -C remote_mono OBJDIR=$(OBJDIR)/remote_mono -endif 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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning plugins/bitmaps/mono" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) @rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning plugins/bitmaps/native" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) @rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning plugins/bitmaps/remotemono" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) @rmdir $(OBJDIR) -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 include $(TOOLSDIR)/makebmp.inc clean: - @echo "cleaning plugins/bitmaps/remote_native" - @rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) @rmdir $(OBJDIR) -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) ifndef SIMVER $(OBJDIR)/chessbox.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/chessbox.map $(OUTPUT): $(OBJDIR)/chessbox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -54,8 +52,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -70,8 +67,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -87,9 +83,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -108,13 +103,11 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning chessbox" - @rm -rf $(OBJDIR)/chessbox - @rm -f $(OBJDIR)/chessbox.* $(DEPFILE) + $(call PRINTS,cleaning chessbox)rm -rf $(OBJDIR)/chessbox + $(SILENT)rm -f $(OBJDIR)/chessbox.* $(DEPFILE) -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) ifndef SIMVER $(OBJDIR)/databox.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/databox.map $(OUTPUT): $(OBJDIR)/databox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -78,9 +74,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -99,14 +94,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning databox" - @rm -rf $(OBJDIR)/databox - @rm -f $(OBJDIR)/databox.* $(DEPFILE) + $(call PRINTS,cleaning databox)rm -rf $(OBJDIR)/databox + $(SILENT)rm -f $(OBJDIR)/databox.* $(DEPFILE) -include $(DEPFILE) 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 @@ # $Id$ # # $Log$ -# Revision 1.9 2006/10/23 22:33:36 amiconn +# Revision 1.10 2006/10/27 21:47:55 amiconn +# 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. +# +# Revision 1.9 2006-10-23 22:33:36 amiconn # Consistent style of 'make' messages. Always use ranlib after ar. # # Revision 1.8 2006-10-23 14:09:28 markun @@ -85,13 +88,11 @@ all: $(OUTPUT) ifndef SIMVER $(OBJDIR)/doom.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) $(LDFLAGS) -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc\ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/doom.map $(OUTPUT): $(OBJDIR)/doom.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -99,8 +100,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -115,8 +115,7 @@ ifeq ($(SIMVER), sdl) # This is the sdl simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -132,9 +131,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -153,13 +151,11 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ -E -P - >$@ clean: - @echo "cleaning doom" - @rm -rf $(OBJDIR)/doom - @rm -f $(OBJDIR)/doom.* $(DEPFILE) + $(call PRINTS,cleaning doom)rm -rf $(OBJDIR)/doom + $(SILENT)rm -f $(OBJDIR)/doom.* $(DEPFILE) -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 all: $(OUTPUT) $(OUTPUT): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $+ >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning lib" - @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) + $(call PRINTS,cleaning lib)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) -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) ifndef SIMVER $(OBJDIR)/mpegplayer.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/mpegplayer.map $(OUTPUT): $(OBJDIR)/mpegplayer.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -81,9 +77,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)@$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -102,14 +97,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning mpegplayer" - @rm -rf $(OBJDIR)/mpegplayer - @rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE) + $(call PRINTS,cleaning mpegplayer)rm -rf $(OBJDIR)/mpegplayer + $(SILENT)rm -f $(OBJDIR)/mpegplayer.* $(DEPFILE) -include $(DEPFILE) 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) ifndef SIMVER $(OBJDIR)/pacbox.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/pacbox.map $(OUTPUT): $(OBJDIR)/pacbox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -48,8 +46,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -64,8 +61,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -81,9 +77,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -102,14 +97,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning pacbox" - @rm -rf $(OBJDIR)/pacbox - @rm -f $(OBJDIR)/pacbox.* $(DEPFILE) + $(call PRINTS,cleaning pacbox)rm -rf $(OBJDIR)/pacbox + $(SILENT)rm -f $(OBJDIR)/pacbox.* $(DEPFILE) -include $(DEPFILE) 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) ifndef SIMVER $(OBJDIR)/rockboy.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O2 -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -fast -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockboy.map $(OUTPUT): $(OBJDIR)/rockboy.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -61,8 +59,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -77,8 +74,7 @@ ifeq ($(SIMVER), sdl) # This is the sdl simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -94,9 +90,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -115,14 +110,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) \ -E -P - >$@ clean: - @echo "cleaning rockboy" - @rm -rf $(OBJDIR)/rockboy - @rm -f $(OBJDIR)/rockboy.* $(DEPFILE) + $(call PRINTS,cleaning rockboy)rm -rf $(OBJDIR)/rockboy + $(SILENT)rm -f $(OBJDIR)/rockboy.* $(DEPFILE) -include $(DEPFILE) 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) ifndef SIMVER $(OBJDIR)/searchengine.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/searchengine.map $(OUTPUT): $(OBJDIR)/searchengine.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -45,8 +43,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -61,8 +58,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -78,9 +74,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -99,14 +94,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning searchengine" - @rm -rf $(OBJDIR)/searchengine - @rm -f $(OBJDIR)/searchengine.* $(DEPFILE) + $(call PRINTS,cleaning searchengine)rm -rf $(OBJDIR)/searchengine + $(SILENT)rm -f $(OBJDIR)/searchengine.* $(DEPFILE) -include $(DEPFILE) 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) ifndef SIMVER $(OBJDIR)/sudoku.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/sudoku.map $(OUTPUT): $(OBJDIR)/sudoku.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), x11) @@ -52,8 +50,7 @@ ifeq ($(SIMVER), x11) # This is the X11 simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -68,8 +65,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -85,9 +81,8 @@ DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin $(OUTPUT): $(OBJS) - @echo "DLL $(notdir $@)" - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ + $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS) + $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \ $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" @@ -106,13 +101,11 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning sudoku" - @rm -rf $(OBJDIR)/sudoku - @rm -f $(OBJDIR)/sudoku.* $(DEPFILE) + $(call PRINTS,cleaning sudoku)rm -rf $(OBJDIR)/sudoku + $(SILENT)rm -f $(OBJDIR)/sudoku.* $(DEPFILE) -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) ifndef SIMVER $(OBJDIR)/zxbox.elf: $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - @$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \ -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/zxbox.map $(OUTPUT): $(OBJDIR)/zxbox.elf - @echo "OBJCOPY $(notdir $@)" - @$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ else ifeq ($(SIMVER), sdl) @@ -57,8 +55,7 @@ ifeq ($(SIMVER), sdl) # This is the SDL simulator version $(OUTPUT): $(OBJS) - @echo "LD $(notdir $@)" - @$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ + $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin -o $@ ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN) # 'x' must be kept or you'll have "Win32 error 5" # $ fgrep 5 /usr/include/w32api/winerror.h | head -1 @@ -76,14 +73,12 @@ include $(TOOLSDIR)/make.inc # MEMORYSIZE should be passed on to this makefile with the chosen memory size # given in number of MB $(LINKFILE): $(LDS) - @echo "build $(notdir $@)" - @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ + $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \ $(DEFINES) -E -P - >$@ clean: - @echo "cleaning zxbox" - @rm -rf $(OBJDIR)/zxbox - @rm -f $(OBJDIR)/zxbox.* $(DEPFILE) + $(call PRINTS,cleaning zxbox)rm -rf $(OBJDIR)/zxbox + $(SILENT)rm -f $(OBJDIR)/zxbox.* $(DEPFILE) -include $(DEPFILE) diff --git a/firmware/Makefile b/firmware/Makefile index 9259f8cc29..dea4c81b33 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -27,26 +27,21 @@ all: $(OUTPUT) $(EXTRA_TARGETS) dep: $(DEPFILE) $(OUTPUT): $(OBJS) $(DEPFILE) - @echo "AR+RANLIB $(notdir $@)" - $(SILENT)$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 $(SILENT)$(RANLIB) $@ include $(TOOLSDIR)/make.inc clean: - @echo "cleaning firmware" - $(SILENT)rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c $(DEPFILE) + $(call PRINTS,cleaning firmware)rm -f $(OBJS) $(OUTPUT) $(OBJDIR)/sysfont.c $(DEPFILE) $(SILENT)rm -rf $(OBJDIR)/drivers $(OBJDIR)/common # Special targets $(OBJDIR)/thread.o: thread.c export/thread.h - $(SILENT)echo "CC thread.c" - $(SILENT)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@ + $(call PRINTS,CC thread.c)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@ $(OBJDIR)/sysfont.o: ../fonts/rockbox_default.bdf - @echo "CONVBDF" - $(SILENT)$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< - @echo "CC sysfont.c" - $(SILENT)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@ + $(call PRINTS,CONVBDF)$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< + $(call PRINTS,CC sysfont.c)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@ -include $(DEPFILE) diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 357b855c41..17ccf6da77 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile @@ -10,6 +10,7 @@ ifndef V SILENT=@ endif +PRINTS=$(info $(1))$(SILENT) LDS := link.lds LINKFILE = $(OBJDIR)/linkage.lds @@ -19,37 +20,30 @@ CFLAGS = $(GCCOPTS) all: $(OBJDIR)/compressed.bin $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf - @echo "OBJCOPY $(notdir $@)" - $(SILENT)$(OC) -O binary $< $@ + $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ $(OBJDIR)/compressed.elf : $(OBJS) $(LINKFILE) - @echo "LD $(notdir $@)" - $(SILENT)$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map + $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/compressed.map $(LDS): $(OBJS) $(LINKFILE): $(LDS) - @echo "Build LDS file" - $(SILENT)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ + $(call PRINTS,Build LDS file)cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ $(OBJDIR)/decompressor.o : decompressor.c $(OBJDIR)/uclimage.c $(SILENT)mkdir -p $(dir $@) - @echo "CC $<" - $(SILENT)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ + $(call PRINTS,CC $<)$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@ $(OBJDIR)/startup.o : startup.S $(SILENT)mkdir -p $(dir $@) - @echo "AS $<" - $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ + $(call PRINTS,AS $<)$(CC) $(CFLAGS) -c $< -o $@ $(OBJDIR)/uclimage.o : $(OBJDIR)/uclimage.c $(SILENT)mkdir -p $(dir $@) - @echo "CC $(notdir $<)" - $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ + $(call PRINTS,CC $( $@ + $(call PRINTS,BMP2RB $<)$(BMP2RB) -h $(BMPINCDIR) $< > $@ $(OBJDIR)/%.o: $(OBJDIR)/%.c $(SILENT)mkdir -p $(dir $@) - @echo CC $(notdir $<) - $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ + $(call PRINTS,CC $(/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile index aeec7c6951..ef68230153 100644 --- a/uisimulator/common/Makefile +++ b/uisimulator/common/Makefile @@ -47,12 +47,10 @@ all: $(OUTFILE) include $(TOOLSDIR)/make.inc clean: - @echo "cleaning commonsim" - @$(RM) $(OBJS) *~ core $(DEPFILE) $(OUTFILE) + $(call PRINTS,cleaning commonsim)$(RM) $(OBJS) *~ core $(DEPFILE) $(OUTFILE) $(OUTFILE): $(OBJS) - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ -include $(DEPFILE) diff --git a/uisimulator/sdl/Makefile b/uisimulator/sdl/Makefile index 55b94cec5e..7946ef31a2 100644 --- a/uisimulator/sdl/Makefile +++ b/uisimulator/sdl/Makefile @@ -49,19 +49,16 @@ all: $(OUTFILE) include $(TOOLSDIR)/make.inc $(OUTFILE): $(OBJS) $(BUILDDIR)/UI256.bmp - @echo "AR+RANLIB $(notdir $@)" - @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 - @$(RANLIB) $@ + $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + $(SILENT)$(RANLIB) $@ clean: - @echo "cleaning sim" - @$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE) \ + $(call PRINTS,cleaning sim)$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE) \ $(BUILDDIR)/UI256.bmp $(DEPFILE) - @$(MAKE) -C $(SIMCOMMON) clean + $(SILENT)$(MAKE) -C $(SIMCOMMON) clean ################## Specific dependencies ################## $(BUILDDIR)/UI256.bmp: UI-$(ARCHOS).bmp - @echo UI - @cp $< $@ + $(call PRINTS,UI)cp $< $@ -include $(DEPFILE)