summaryrefslogtreecommitdiff
path: root/apps/plugins/Makefile
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-10-27 21:48:06 +0000
committerJens Arnold <amiconn@rockbox.org>2006-10-27 21:48:06 +0000
commita796260a6b9929f6aca844b4a788a2f55ef60d4b (patch)
tree21d3f983c2e618806cf6f160c67f7efd053061f0 /apps/plugins/Makefile
parent354770088e87c3aa8720f462fe3ac8368d7de5b5 (diff)
downloadrockbox-a796260a6b9929f6aca844b4a788a2f55ef60d4b.tar.gz
rockbox-a796260a6b9929f6aca844b4a788a2f55ef60d4b.zip
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
Diffstat (limited to 'apps/plugins/Makefile')
-rw-r--r--apps/plugins/Makefile48
1 files changed, 23 insertions, 25 deletions
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