blob: 78294a5e8cbbbc5194df54a29e1df499cc763a16 [file] [log] [blame]
Björn Stenbergc6b3d382008-11-20 11:27:31 +00001# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
Björn Stenberga091d202008-11-25 19:54:23 +00007# $Id$
Björn Stenbergc6b3d382008-11-20 11:27:31 +00008#
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
Vencislav Atanasov7f9fc202019-07-28 19:44:23 +030029PBMP_BUILD := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(PBMP))
30
31PLUGIN_BITMAPS := $(PBMP_BUILD:%.bmp=%.o)
Björn Stenbergc6b3d382008-11-20 11:27:31 +000032
33PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a
34PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB))
35
Vencislav Atanasov7f9fc202019-07-28 19:44:23 +030036PBMPHFILES := $(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 Stenbergc6b3d382008-11-20 11:27:31 +000037
38$(PBMPHFILES): $(PLUGIN_BITMAPS)
39
40$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS)
Björn Stenberg303b4552008-11-20 16:49:55 +000041 $(SILENT)$(shell rm -f $@)
Jens Arnold6421f942009-03-01 09:04:15 +000042 $(call PRINTS,AR $(@F))$(AR) rcs $@ $+ >/dev/null
Björn Stenbergc6b3d382008-11-20 11:27:31 +000043
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 Martitz9a70c422011-11-13 15:37:16 +000047 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_MONO) -b -h $(PBMPINCDIR) $< > $@
Björn Stenbergc6b3d382008-11-20 11:27:31 +000048
49$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb
50 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
Thomas Martitz9a70c422011-11-13 15:37:16 +000051 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_NATIVE) -b -h $(PBMPINCDIR) $< > $@
Björn Stenbergc6b3d382008-11-20 11:27:31 +000052
53$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb
54 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
Thomas Martitz9a70c422011-11-13 15:37:16 +000055 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTEMONO) -b -h $(PBMPINCDIR) $< > $@
Björn Stenbergc6b3d382008-11-20 11:27:31 +000056
57$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb
58 $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR)
Thomas Martitz9a70c422011-11-13 15:37:16 +000059 $(call PRINTS,BMP2RB $(<F))$(BMP2RB_REMOTENATIVE) -b -h $(PBMPINCDIR) $< > $@
Björn Stenbergc6b3d382008-11-20 11:27:31 +000060
61endif