2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 PBMPINCDIR
= $(BUILDDIR
)/pluginbitmaps
12 PFLAGS
+= -I
$(PBMPINCDIR
)
14 ifneq ($(strip $(BMP2RB_MONO
)),)
15 PBMP
= $(call preprocess
, $(APPSDIR
)/plugins
/bitmaps
/mono
/SOURCES
)
17 ifneq ($(strip $(BMP2RB_NATIVE
)),)
18 PBMP
+= $(call preprocess
, $(APPSDIR
)/plugins
/bitmaps
/native
/SOURCES
)
20 ifneq ($(strip $(BMP2RB_REMOTEMONO
)),)
21 PBMP
+= $(call preprocess
, $(APPSDIR
)/plugins
/bitmaps
/remote_mono
/SOURCES
)
23 ifneq ($(strip $(BMP2RB_REMOTENATIVE
)),)
24 PBMP
+= $(call preprocess
, $(APPSDIR
)/plugins
/bitmaps
/remote_native
/SOURCES
)
27 ifdef PBMP
# does player use bitmaps?
29 PLUGIN_BITMAPS
:= $(PBMP
:$(ROOTDIR
)/%.bmp
=$(BUILDDIR
)/%.o
)
31 PLUGINBITMAPLIB
:= $(BUILDDIR
)/apps
/plugins
/bitmaps
/libpluginbitmaps.a
32 PLUGINBITMAPDIR
:= $(dir $(PLUGINBITMAPLIB
))
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')
37 $(PBMPHFILES
): $(PLUGIN_BITMAPS
)
39 $(PLUGINBITMAPLIB
): $(PLUGIN_BITMAPS
)
40 $(SILENT
)$(shell rm -f
$@
)
41 $(call PRINTS
,AR
$(@F
))$(AR
) rcs
$@
$+ >/dev
/null
43 # pattern rules to create .c files from .bmp, one for each subdir:
44 $(BUILDDIR
)/apps
/plugins
/bitmaps
/mono
/%.c
: $(ROOTDIR
)/apps
/plugins
/bitmaps
/mono
/%.bmp
$(TOOLSDIR
)/bmp2rb
45 $(SILENT
)mkdir
-p
$(dir $@
) $(PBMPINCDIR
)
46 $(call PRINTS
,BMP2RB
$(<F
))$(BMP2RB_MONO
) -h
$(PBMPINCDIR
) $< > $@
48 $(BUILDDIR
)/apps
/plugins
/bitmaps
/native
/%.c
: $(ROOTDIR
)/apps
/plugins
/bitmaps
/native
/%.bmp
$(TOOLSDIR
)/bmp2rb
49 $(SILENT
)mkdir
-p
$(dir $@
) $(PBMPINCDIR
)
50 $(call PRINTS
,BMP2RB
$(<F
))$(BMP2RB_NATIVE
) -h
$(PBMPINCDIR
) $< > $@
52 $(BUILDDIR
)/apps
/plugins
/bitmaps
/remote_mono
/%.c
: $(ROOTDIR
)/apps
/plugins
/bitmaps
/remote_mono
/%.bmp
$(TOOLSDIR
)/bmp2rb
53 $(SILENT
)mkdir
-p
$(dir $@
) $(PBMPINCDIR
)
54 $(call PRINTS
,BMP2RB
$(<F
))$(BMP2RB_REMOTEMONO
) -h
$(PBMPINCDIR
) $< > $@
56 $(BUILDDIR
)/apps
/plugins
/bitmaps
/remote_native
/%.c
: $(ROOTDIR
)/apps
/plugins
/bitmaps
/remote_native
/%.bmp
$(TOOLSDIR
)/bmp2rb
57 $(SILENT
)mkdir
-p
$(dir $@
) $(PBMPINCDIR
)
58 $(call PRINTS
,BMP2RB
$(<F
))$(BMP2RB_REMOTENATIVE
) -h
$(PBMPINCDIR
) $< > $@