2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $
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 $(call PRINTS
,AR
$(@F
))$(AR
) rs
$@
$+ >/dev
/null
2>&1
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
) $< > $@
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
) $< > $@
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
) $< > $@
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
) $< > $@