diff options
Diffstat (limited to 'apps/plugins/bitmaps/pluginbitmaps.make')
-rw-r--r-- | apps/plugins/bitmaps/pluginbitmaps.make | 59 |
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 | |||
10 | PBMPINCDIR = $(BUILDDIR)/pluginbitmaps | ||
11 | |||
12 | PFLAGS += -I$(PBMPINCDIR) | ||
13 | |||
14 | ifneq ($(strip $(BMP2RB_MONO)),) | ||
15 | PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES) | ||
16 | endif | ||
17 | ifneq ($(strip $(BMP2RB_NATIVE)),) | ||
18 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES) | ||
19 | endif | ||
20 | ifneq ($(strip $(BMP2RB_REMOTEMONO)),) | ||
21 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES) | ||
22 | endif | ||
23 | ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) | ||
24 | PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES) | ||
25 | endif | ||
26 | |||
27 | ifdef PBMP # does player use bitmaps? | ||
28 | |||
29 | PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) | ||
30 | |||
31 | PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a | ||
32 | PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) | ||
33 | |||
34 | PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP)) | ||
35 | 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') | ||
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 | |||
59 | endif | ||