summaryrefslogtreecommitdiff
path: root/apps/plugins/bitmaps/pluginbitmaps.make
diff options
context:
space:
mode:
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 0000000000..7dbcc0bdff
--- /dev/null
+++ b/apps/plugins/bitmaps/pluginbitmaps.make
@@ -0,0 +1,59 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
8#
9
10PBMPINCDIR = $(BUILDDIR)/pluginbitmaps
11
12PFLAGS += -I$(PBMPINCDIR)
13
14ifneq ($(strip $(BMP2RB_MONO)),)
15PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES)
16endif
17ifneq ($(strip $(BMP2RB_NATIVE)),)
18PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES)
19endif
20ifneq ($(strip $(BMP2RB_REMOTEMONO)),)
21PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES)
22endif
23ifneq ($(strip $(BMP2RB_REMOTENATIVE)),)
24PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES)
25endif
26
27ifdef PBMP # does player use bitmaps?
28
29PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o)
30
31PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
32PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
33
34PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP))
35PBMPHFILES := $(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')
36
37$(PBMPHFILES): $(PLUGIN_BITMAPS)
38
39$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS)
40 $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1
41
42# pattern rules to create .c files from .bmp, one for each subdir:
43$(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb
44 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
45 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -h $(PBMPINCDIR) $< > $@
46
47$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
48 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
49 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -h $(PBMPINCDIR) $< > $@
50
51$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
52 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
53 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -h $(PBMPINCDIR) $< > $@
54
55$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
56 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
57 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -h $(PBMPINCDIR) $< > $@
58
59endif