From c6b3d38a156dd624760a8eb1bb374affd43b4f2a Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 20 Nov 2008 11:27:31 +0000 Subject: New makefile solution: A single invocation of 'make' to build the entire tree. Fully controlled dependencies give faster and more correct recompiles. Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/bitmaps/mono/Makefile | 32 ----------- apps/plugins/bitmaps/native/Makefile | 32 ----------- apps/plugins/bitmaps/native/SOURCES | 48 ++++++++--------- .../bitmaps/native/star_tiles.10x10.grey.bmp | Bin 1678 -> 0 bytes apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp | Bin 0 -> 1678 bytes .../plugins/bitmaps/native/star_tiles.6x7.mono.bmp | Bin 184 -> 0 bytes apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp | Bin 0 -> 184 bytes .../plugins/bitmaps/native/star_tiles.8x8.grey.bmp | Bin 390 -> 0 bytes apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp | Bin 0 -> 390 bytes apps/plugins/bitmaps/pluginbitmaps.make | 59 +++++++++++++++++++++ apps/plugins/bitmaps/remote_mono/Makefile | 32 ----------- apps/plugins/bitmaps/remote_native/Makefile | 32 ----------- apps/plugins/bitmaps/remote_native/SOURCES | 4 +- 13 files changed, 85 insertions(+), 154 deletions(-) delete mode 100644 apps/plugins/bitmaps/mono/Makefile delete mode 100644 apps/plugins/bitmaps/native/Makefile delete mode 100644 apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp create mode 100644 apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp delete mode 100644 apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp create mode 100644 apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp delete mode 100644 apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp create mode 100644 apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp create mode 100644 apps/plugins/bitmaps/pluginbitmaps.make delete mode 100644 apps/plugins/bitmaps/remote_mono/Makefile delete mode 100644 apps/plugins/bitmaps/remote_native/Makefile (limited to 'apps/plugins/bitmaps') diff --git a/apps/plugins/bitmaps/mono/Makefile b/apps/plugins/bitmaps/mono/Makefile deleted file mode 100644 index 03eb77a55b..0000000000 --- a/apps/plugins/bitmaps/mono/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ - -I$(OBJDIR) -CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) - -# This sets up 'SRC' based on the files mentioned in SOURCES -include $(TOOLSDIR)/makesrc.inc - -SOURCES = $(SRC) -CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) -OBJS := $(CSRC:%.c=%.o) -DEPFILE = $(OBJDIR)/dep-bitmaps-mono - -BMP2RB = $(BMP2RB_MONO) -OUTPUT = $(BUILDDIR)/libpluginbitmapsmono.a -BMPINCDIR = $(BUILDDIR)/pluginbitmaps - -include $(TOOLSDIR)/makebmp.inc - -clean: - $(call PRINTS,cleaning plugins/bitmaps/mono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) - --include $(DEPFILE) diff --git a/apps/plugins/bitmaps/native/Makefile b/apps/plugins/bitmaps/native/Makefile deleted file mode 100644 index 071f0d4ba1..0000000000 --- a/apps/plugins/bitmaps/native/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ - -I$(OBJDIR) -CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) - -# This sets up 'SRC' based on the files mentioned in SOURCES -include $(TOOLSDIR)/makesrc.inc - -SOURCES = $(SRC) -CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) -OBJS := $(CSRC:%.c=%.o) -DEPFILE = $(OBJDIR)/dep-bitmaps-native - -BMP2RB = $(BMP2RB_NATIVE) -OUTPUT = $(BUILDDIR)/libpluginbitmapsnative.a -BMPINCDIR = $(BUILDDIR)/pluginbitmaps - -include $(TOOLSDIR)/makebmp.inc - -clean: - $(call PRINTS,cleaning plugins/bitmaps/native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) - --include $(DEPFILE) diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index b95fd379c0..c248bcb97b 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -574,13 +574,13 @@ star_tiles.8x8.bmp #endif #elif LCD_DEPTH > 1 /* grey */ #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 98 -star_tiles.10x10.grey.bmp +star_tiles.10x10x2.bmp #elif LCD_WIDTH >= 128 && LCD_HEIGHT >= 80 -star_tiles.8x8.grey.bmp +star_tiles.8x8x2.bmp #endif #else /* monochrome */ #if LCD_WIDTH >= 112 && LCD_HEIGHT >= 62 -star_tiles.6x7.mono.bmp +star_tiles.6x7x1.bmp #endif #endif @@ -669,14 +669,14 @@ matrix_normal.bmp /* pictureflow */ #if defined(HAVE_LCD_COLOR) && defined(HAVE_ALBUMART) && defined(HAVE_TAGCACHE) #if (LCD_WIDTH < 200) - pictureflow_logo.100x18x16.bmp +pictureflow_logo.100x18x16.bmp #else - pictureflow_logo.193x34x16.bmp +pictureflow_logo.193x34x16.bmp #endif #if (LCD_HEIGHT < 100 ) - pictureflow_emptyslide.50x50x16.bmp +pictureflow_emptyslide.50x50x16.bmp #else - pictureflow_emptyslide.100x100x16.bmp +pictureflow_emptyslide.100x100x16.bmp #endif #endif @@ -689,53 +689,53 @@ matrix_normal.bmp #if defined HAVE_LCD_COLOR #if SMALLER_DIMENSION <= 80 - sliding_puzzle.80x80x16.bmp +sliding_puzzle.80x80x16.bmp #elif SMALLER_DIMENSION <= 108 - sliding_puzzle.108x108x16.bmp +sliding_puzzle.108x108x16.bmp #elif SMALLER_DIMENSION <= 128 - sliding_puzzle.128x128x16.bmp +sliding_puzzle.128x128x16.bmp #elif SMALLER_DIMENSION <= 132 - sliding_puzzle.132x132x16.bmp +sliding_puzzle.132x132x16.bmp #elif SMALLER_DIMENSION <= 176 - sliding_puzzle.176x176x16.bmp +sliding_puzzle.176x176x16.bmp #elif SMALLER_DIMENSION <= 240 - sliding_puzzle.240x240x16.bmp +sliding_puzzle.240x240x16.bmp #endif #elif (LCD_DEPTH > 1) #if SMALLER_DIMENSION <= 96 - sliding_puzzle.96x96x2.bmp +sliding_puzzle.96x96x2.bmp #elif SMALLER_DIMENSION <= 110 - sliding_puzzle.108x108x2.bmp +sliding_puzzle.108x108x2.bmp #elif SMALLER_DIMENSION <= 128 - sliding_puzzle.128x128x2.bmp +sliding_puzzle.128x128x2.bmp #endif #else /* mono targets, one size currently */ - sliding_puzzle.80x64x1.bmp +sliding_puzzle.80x64x1.bmp #endif /* Logo */ #if LCD_DEPTH == 16 #if (LCD_WIDTH >= 320) - rockboxlogo.220x68x16.bmp +rockboxlogo.220x68x16.bmp #elif (LCD_WIDTH > 160) - rockboxlogo.128x40x16.bmp +rockboxlogo.128x40x16.bmp #else - rockboxlogo.90x28x16.bmp +rockboxlogo.90x28x16.bmp #endif #elif LCD_DEPTH == 2 #if (LCD_WIDTH > 138) - rockboxlogo.138x46x2.bmp +rockboxlogo.138x46x2.bmp #else - rockboxlogo.91x32x2.bmp +rockboxlogo.91x32x2.bmp #endif #elif LCD_DEPTH == 1 #if (LCD_WIDTH > 112) /* Such a screen isn't currently in any target */ - rockboxlogo.112x30x1.bmp +rockboxlogo.112x30x1.bmp #else - rockboxlogo.91x32x1.bmp +rockboxlogo.91x32x1.bmp #endif #endif diff --git a/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp b/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp deleted file mode 100644 index 54e14bbbe1..0000000000 Binary files a/apps/plugins/bitmaps/native/star_tiles.10x10.grey.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp b/apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp new file mode 100644 index 0000000000..54e14bbbe1 Binary files /dev/null and b/apps/plugins/bitmaps/native/star_tiles.10x10x2.bmp differ diff --git a/apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp b/apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp deleted file mode 100644 index ebc59b9b11..0000000000 Binary files a/apps/plugins/bitmaps/native/star_tiles.6x7.mono.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp b/apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp new file mode 100644 index 0000000000..ebc59b9b11 Binary files /dev/null and b/apps/plugins/bitmaps/native/star_tiles.6x7x1.bmp differ diff --git a/apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp b/apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp deleted file mode 100644 index 6f810ce562..0000000000 Binary files a/apps/plugins/bitmaps/native/star_tiles.8x8.grey.bmp and /dev/null differ diff --git a/apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp b/apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp new file mode 100644 index 0000000000..6f810ce562 Binary files /dev/null and b/apps/plugins/bitmaps/native/star_tiles.8x8x2.bmp differ 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 @@ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ +# + +PBMPINCDIR = $(BUILDDIR)/pluginbitmaps + +PFLAGS += -I$(PBMPINCDIR) + +ifneq ($(strip $(BMP2RB_MONO)),) +PBMP = $(call preprocess, $(APPSDIR)/plugins/bitmaps/mono/SOURCES) +endif +ifneq ($(strip $(BMP2RB_NATIVE)),) +PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/native/SOURCES) +endif +ifneq ($(strip $(BMP2RB_REMOTEMONO)),) +PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_mono/SOURCES) +endif +ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) +PBMP += $(call preprocess, $(APPSDIR)/plugins/bitmaps/remote_native/SOURCES) +endif + +ifdef PBMP # does player use bitmaps? + +PLUGIN_BITMAPS := $(PBMP:$(ROOTDIR)/%.bmp=$(BUILDDIR)/%.o) + +PLUGINBITMAPLIB := $(BUILDDIR)/apps/plugins/bitmaps/libpluginbitmaps.a +PLUGINBITMAPDIR := $(dir $(PLUGINBITMAPLIB)) + +PBMPHFILES := $(subst $(ROOTDIR),$(BUILDDIR),$(PBMP)) +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') + +$(PBMPHFILES): $(PLUGIN_BITMAPS) + +$(PLUGINBITMAPLIB): $(PLUGIN_BITMAPS) + $(call PRINTS,AR $(@F))$(AR) rs $@ $+ >/dev/null 2>&1 + +# pattern rules to create .c files from .bmp, one for each subdir: +$(BUILDDIR)/apps/plugins/bitmaps/mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/mono/%.bmp $(TOOLSDIR)/bmp2rb + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) + $(call PRINTS,BMP2RB $( $@ + +$(BUILDDIR)/apps/plugins/bitmaps/native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/native/%.bmp $(TOOLSDIR)/bmp2rb + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) + $(call PRINTS,BMP2RB $( $@ + +$(BUILDDIR)/apps/plugins/bitmaps/remote_mono/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_mono/%.bmp $(TOOLSDIR)/bmp2rb + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) + $(call PRINTS,BMP2RB $( $@ + +$(BUILDDIR)/apps/plugins/bitmaps/remote_native/%.c: $(ROOTDIR)/apps/plugins/bitmaps/remote_native/%.bmp $(TOOLSDIR)/bmp2rb + $(SILENT)mkdir -p $(dir $@) $(PBMPINCDIR) + $(call PRINTS,BMP2RB $( $@ + +endif diff --git a/apps/plugins/bitmaps/remote_mono/Makefile b/apps/plugins/bitmaps/remote_mono/Makefile deleted file mode 100644 index d3858fa46a..0000000000 --- a/apps/plugins/bitmaps/remote_mono/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ - -I$(OBJDIR) -CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) - -# This sets up 'SRC' based on the files mentioned in SOURCES -include $(TOOLSDIR)/makesrc.inc - -SOURCES = $(SRC) -CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) -OBJS := $(CSRC:%.c=%.o) -DEPFILE = $(OBJDIR)/dep-bitmaps-remotemono - -BMP2RB = $(BMP2RB_REMOTEMONO) -OUTPUT = $(BUILDDIR)/libpluginbitmapsremotemono.a -BMPINCDIR = $(BUILDDIR)/pluginbitmaps - -include $(TOOLSDIR)/makebmp.inc - -clean: - $(call PRINTS,cleaning plugins/bitmaps/remotemono)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) - --include $(DEPFILE) diff --git a/apps/plugins/bitmaps/remote_native/Makefile b/apps/plugins/bitmaps/remote_native/Makefile deleted file mode 100644 index 3802e75781..0000000000 --- a/apps/plugins/bitmaps/remote_native/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# __________ __ ___. -# Open \______ \ ____ ____ | | _\_ |__ _______ ___ -# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / -# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < -# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ -# \/ \/ \/ \/ \/ -# $Id$ -# - -INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \ - -I$(OBJDIR) -CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) - -# This sets up 'SRC' based on the files mentioned in SOURCES -include $(TOOLSDIR)/makesrc.inc - -SOURCES = $(SRC) -CSRC := $(SRC:%.bmp=$(OBJDIR)/%.c) -OBJS := $(CSRC:%.c=%.o) -DEPFILE = $(OBJDIR)/dep-bitmaps-remotenative - -BMP2RB = $(BMP2RB_REMOTENATIVE) -OUTPUT = $(BUILDDIR)/libpluginbitmapsremotenative.a -BMPINCDIR = $(BUILDDIR)/pluginbitmaps - -include $(TOOLSDIR)/makebmp.inc - -clean: - $(call PRINTS,cleaning plugins/bitmaps/remote_native)rm -f $(CSRC) $(OBJS) $(OUTPUT) $(DEPFILE) - @rmdir $(OBJDIR) - --include $(DEPFILE) diff --git a/apps/plugins/bitmaps/remote_native/SOURCES b/apps/plugins/bitmaps/remote_native/SOURCES index 3633f23eb1..2bc3d59c07 100644 --- a/apps/plugins/bitmaps/remote_native/SOURCES +++ b/apps/plugins/bitmaps/remote_native/SOURCES @@ -18,7 +18,7 @@ clock_smallsegments_remote.112x64x1.bmp /* Logo */ #if (LCD_REMOTE_DEPTH == 1) - remote_rockboxlogo.91x32x1.bmp +remote_rockboxlogo.91x32x1.bmp #elif (LCD_REMOTE_DEPTH == 2) - remote_rockboxlogo.91x32x2.bmp +remote_rockboxlogo.91x32x2.bmp #endif -- cgit v1.2.3