Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
Björn Stenberg | a091d20 | 2008-11-25 19:54:23 +0000 | [diff] [blame] | 7 | # $Id$ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 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 | |
Vencislav Atanasov | 7f9fc20 | 2019-07-28 19:44:23 +0300 | [diff] [blame^] | 29 | PBMP_BUILD := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(PBMP)) |
| 30 | |
| 31 | PLUGIN_BITMAPS := $(PBMP_BUILD:%.bmp=%.o) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 32 | |
| 33 | PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a |
| 34 | PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) |
| 35 | |
Vencislav Atanasov | 7f9fc20 | 2019-07-28 19:44:23 +0300 | [diff] [blame^] | 36 | PBMPHFILES := $(shell echo $(PBMP_BUILD) | sed -e 's/\.[0-9x]*\.bmp/.h/g' -e 's/\.bmp/.h/g' | awk "{ gsub(/apps\/plugins\/bitmaps\/(mono|native|remote_mono|remote_native)/, \"pluginbitmaps\"); print }" ) |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 37 | |
| 38 | $(PBMPHFILES): $(PLUGIN_BITMAPS) |
| 39 | |
| 40 | $(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS) |
Björn Stenberg | 303b455 | 2008-11-20 16:49:55 +0000 | [diff] [blame] | 41 | $(SILENT)$(shell rm -f $@) |
Jens Arnold | 6421f94 | 2009-03-01 09:04:15 +0000 | [diff] [blame] | 42 | $(call PRINTS,AR $(@F))$(AR) rcs $@ $+ >/dev/null |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 43 | |
| 44 | # pattern rules to create .c files from .bmp, one for each subdir: |
| 45 | $(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb |
| 46 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) |
Thomas Martitz | 9a70c42 | 2011-11-13 15:37:16 +0000 | [diff] [blame] | 47 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -b -h $(PBMPINCDIR) $< > $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 48 | |
| 49 | $(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb |
| 50 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) |
Thomas Martitz | 9a70c42 | 2011-11-13 15:37:16 +0000 | [diff] [blame] | 51 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -b -h $(PBMPINCDIR) $< > $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 52 | |
| 53 | $(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb |
| 54 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) |
Thomas Martitz | 9a70c42 | 2011-11-13 15:37:16 +0000 | [diff] [blame] | 55 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -b -h $(PBMPINCDIR) $< > $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 56 | |
| 57 | $(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb |
| 58 | $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) |
Thomas Martitz | 9a70c42 | 2011-11-13 15:37:16 +0000 | [diff] [blame] | 59 | $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -b -h $(PBMPINCDIR) $< > $@ |
Björn Stenberg | c6b3d38 | 2008-11-20 11:27:31 +0000 | [diff] [blame] | 60 | |
| 61 | endif |