summaryrefslogtreecommitdiff
path: root/apps/plugins/bitmaps/pluginbitmaps.make
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-11-20 11:27:31 +0000
commitc6b3d38a156dd624760a8eb1bb374affd43b4f2a (patch)
tree493eba929e2396d86cf4f077709aa09fe172cd35 /apps/plugins/bitmaps/pluginbitmaps.make
parentf66c30346783a400a029bedcd60ab67c81c34a07 (diff)
downloadrockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.zip
rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.gz
rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.bz2
rockbox-c6b3d38a156dd624760a8eb1bb374affd43b4f2a.tar.xz
New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles.
Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/bitmaps/pluginbitmaps.make')
-rw-r--r--apps/plugins/bitmaps/pluginbitmaps.make59
1 files changed, 59 insertions, 0 deletions
diff --git a/apps/plugins/bitmaps/pluginbitmaps.make b/apps/plugins/bitmaps/pluginbitmaps.make
new file mode 100644
index 0000000..7dbcc0b
--- /dev/null
+++ b/apps/plugins/bitmaps/pluginbitmaps.make
@@ -0,0 +1,59 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
+#
+
+PBMPINCDIR = $(BUILDDIR)/pluginbitmaps
+
+PFLAGS += -I$(PBMPINCDIR)
+
+ifneq ($(strip $(BMP2RB_MONO)),)
+PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES)
+endif
+ifneq ($(strip $(BMP2RB_NATIVE)),)
+PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES)
+endif
+ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
+PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES)
+endif
+ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
+PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES)
+endif
+
+ifdef PBMP # does player use bitmaps?
+
+PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o)
+
+PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
+PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
+
+PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP))
+PBMPHFILES := $(shell echo $(PBMPHFILES) | sed -e 's/\.[0-9x]\+\.bmp/.h/g' -e 's/\.bmp/.h/g' -e 's/apps\/plugins\/bitmaps\/\(mono\|native\|remote_mono\|remote_native\)/pluginbitmaps/g')
+
+$(PBMPHFILES): $(PLUGIN_BITMAPS)
+
+$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS)
+ $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1
+
+# pattern rules to create .c files from .bmp, one for each subdir:
+$(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb
+ $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
+ $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@
+
+$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
+ $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
+ $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@
+
+$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
+ $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
+ $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@
+
+$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
+ $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
+ $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@
+
+endif