From ac488f8cb77d7786fe22e642f6177f46e5e6b1db Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Mon, 3 Nov 2008 14:37:50 +0000 Subject: Makefile overhaul. All generated bitmaps are now explicitly in OBJDIR/bitmaps and OBJDIR/pluginbitmaps, and plugins properly depend on their respective bitmap files. Fixes #6847. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18987 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/Makefile | 56 +++++++++++++++++++++++-------------------- apps/plugins/blackjack.c | 4 ++-- apps/plugins/brickmania.c | 16 ++++++------- apps/plugins/bubbles.c | 6 ++--- apps/plugins/flipit.c | 4 ++-- apps/plugins/jackpot.c | 4 ++-- apps/plugins/logo.c | 4 ++-- apps/plugins/pegbox.c | 8 +++---- apps/plugins/pictureflow.c | 4 ++-- apps/plugins/sliding_puzzle.c | 2 +- apps/plugins/snake2.c | 10 ++++---- apps/plugins/sokoban.c | 2 +- apps/plugins/solitaire.c | 6 ++--- apps/plugins/star.c | 2 +- 14 files changed, 66 insertions(+), 62 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile index 4f518a2c1c..c9405a49b9 100644 --- a/apps/plugins/Makefile +++ b/apps/plugins/Makefile @@ -8,8 +8,8 @@ # INCLUDES = $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ - -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) \ - -I$(BUILDDIR)/pluginbitmaps + -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) + CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN @@ -25,19 +25,19 @@ endif BITMAPLIBS = LINKBITMAPS = ifneq ($(strip $(BMP2RB_MONO)),) - BITMAPLIBS += $(BUILDDIR)/libpluginbitmapsmono.a + BITMAPLIBS += pluginbitmapsmono LINKBITMAPS += -lpluginbitmapsmono endif ifneq ($(strip $(BMP2RB_NATIVE)),) - BITMAPLIBS += $(BUILDDIR)/libpluginbitmapsnative.a + BITMAPLIBS += pluginbitmapsnative LINKBITMAPS += -lpluginbitmapsnative endif ifneq ($(strip $(BMP2RB_REMOTEMONO)),) - BITMAPLIBS += $(BUILDDIR)/libpluginbitmapsremotemono.a + BITMAPLIBS += pluginbitmapsremotemono LINKBITMAPS += -lpluginbitmapsremotemono endif ifneq ($(strip $(BMP2RB_REMOTENATIVE)),) - BITMAPLIBS += $(BUILDDIR)/libpluginbitmapsremotenative.a + BITMAPLIBS += pluginbitmapsremotenative LINKBITMAPS += -lpluginbitmapsremotenative endif @@ -60,12 +60,18 @@ DEFS := $(SRC:%.c=$(OBJDIR)/%.def) DIRS = . .PHONY: $(SUBDIRS) -all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) - -$(DEPFILE): $(BITMAPLIBS) +all: build dep: $(DEPFILE) +build: $(DEPFILE) $(BITMAPLIBS) + $(call PRINTS,MAKE rocks)$(MAKE) rocks + $(call PRINTS,MAKE subdirs)$(MAKE) subdirs + +rocks: $(ROCKS) + +subdirs: $(SUBDIRS) + $(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS $(call PRINTS,create credits.raw)perl credits.pl < $< > $@ @@ -73,34 +79,32 @@ $(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CC $($@ -$(SUBDIRS): $(BITMAPLIBS) +$(SUBDIRS): $(SILENT)mkdir -p $(OBJDIR)/$@ $(call PRINTS,MAKE in $@)$(MAKE) -C $@ OUTDIR=$(OBJDIR) OBJDIR=$(OBJDIR)/$@ \ - LINKBITMAPS="$(LINKBITMAPS)" BITMAPLIBS="$(BITMAPLIBS)" + LINKBITMAPS="$(LINKBITMAPS)" clean: $(call PRINTS,cleaning plugins)rm -f $(ROCKS) $(LINKFILE) $(OBJDIR)/*.rock $(DEPFILE) $(ELFS) \ diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index e6a9fbd8cd..d120d37646 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -20,8 +20,8 @@ ****************************************************************************/ #include "plugin.h" -#include "card_deck.h" -#include "card_back.h" +#include "pluginbitmaps/card_deck.h" +#include "pluginbitmaps/card_back.h" PLUGIN_HEADER diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index d6b1827b94..159e1ecfb4 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -211,12 +211,12 @@ enum menu_items { BM_SEL_QUIT, }; -#include "brickmania_pads.h" -#include "brickmania_bricks.h" -#include "brickmania_powerups.h" -#include "brickmania_ball.h" -#include "brickmania_menu_items.h" -#include "brickmania_gameover.h" +#include "pluginbitmaps/brickmania_pads.h" +#include "pluginbitmaps/brickmania_bricks.h" +#include "pluginbitmaps/brickmania_powerups.h" +#include "pluginbitmaps/brickmania_ball.h" +#include "pluginbitmaps/brickmania_menu_items.h" +#include "pluginbitmaps/brickmania_gameover.h" #define PAD_WIDTH BMPWIDTH_brickmania_pads #define PAD_HEIGHT (BMPHEIGHT_brickmania_pads/3) @@ -234,13 +234,13 @@ enum menu_items { #define GAMEOVER_HEIGHT BMPHEIGHT_brickmania_gameover #if LCD_DEPTH > 1 /* currently no background bmp for mono screens */ -#include "brickmania_menu_bg.h" +#include "pluginbitmaps/brickmania_menu_bg.h" #define MENU_BGHEIGHT BMPHEIGHT_brickmania_menu_bg #define MENU_BGWIDTH BMPWIDTH_brickmania_menu_bg #endif #ifdef HAVE_LCD_COLOR /* currently no transparency for non-colour */ -#include "brickmania_break.h" +#include "pluginbitmaps/brickmania_break.h" #endif #if (LCD_WIDTH == 320) && (LCD_HEIGHT == 240) diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index be94036f4e..17bfeca01d 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -99,10 +99,10 @@ PLUGIN_HEADER /* external bitmaps */ #ifdef HAVE_LCD_COLOR -#include "bubbles_background.h" +#include "pluginbitmaps/bubbles_background.h" #endif -#include "bubbles_bubble.h" -#include "bubbles_emblem.h" +#include "pluginbitmaps/bubbles_bubble.h" +#include "pluginbitmaps/bubbles_emblem.h" #define BUBBLE_WIDTH BMPWIDTH_bubbles_bubble #define BUBBLE_HEIGHT BMPHEIGHT_bubbles_bubble diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 6eff1472df..76d1293527 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -253,8 +253,8 @@ static int cursor_pos, moves; #ifdef HAVE_LCD_BITMAP -#include "flipit_cursor.h" -#include "flipit_tokens.h" +#include "pluginbitmaps/flipit_cursor.h" +#include "pluginbitmaps/flipit_tokens.h" #define PANEL_HEIGHT 12 #define TK_WIDTH BMPWIDTH_flipit_cursor diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index 38cd12e993..a4865b47fb 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -56,9 +56,9 @@ static unsigned long char_patterns[NB_SLOTS]; #endif /* FIXME: would be nice to have better graphics ... */ -#include "jackpot_slots.h" +#include "pluginbitmaps/jackpot_slots.h" #if NB_SCREENS==2 -#include "jackpot_slots_remote.h" +#include "pluginbitmaps/jackpot_slots_remote.h" #endif const struct picture jackpot_pictures[]={ diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 4d4263ee79..be4a39c2b5 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -31,7 +31,7 @@ PLUGIN_HEADER #ifdef HAVE_REMOTE_LCD #define REMOTE_WIDTH LCD_REMOTE_WIDTH #define REMOTE_HEIGHT LCD_REMOTE_HEIGHT -#include "remote_rockboxlogo.h" +#include "pluginbitmaps/remote_rockboxlogo.h" #define REMOTE_LOGO_WIDTH BMPWIDTH_remote_rockboxlogo #define REMOTE_LOGO_HEIGHT BMPHEIGHT_remote_rockboxlogo #define REMOTE_LOGO remote_rockboxlogo @@ -39,7 +39,7 @@ extern const fb_remote_data remote_rockboxlogo[]; #endif /* HAVE_REMOTE_LCD */ #define LOGO rockboxlogo -#include "rockboxlogo.h" +#include "pluginbitmaps/rockboxlogo.h" #define LOGO_WIDTH BMPWIDTH_rockboxlogo #define LOGO_HEIGHT BMPHEIGHT_rockboxlogo extern const fb_data rockboxlogo[]; diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index 0b181fb3a1..643e793fdc 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -20,12 +20,12 @@ ****************************************************************************/ #include "plugin.h" -#include "pegbox_header.h" -#include "pegbox_pieces.h" +#include "pluginbitmaps/pegbox_header.h" +#include "pluginbitmaps/pegbox_pieces.h" #if LCD_HEIGHT >= 80 /* enough space for a graphical menu */ -#include "pegbox_menu_top.h" -#include "pegbox_menu_items.h" +#include "pluginbitmaps/pegbox_menu_top.h" +#include "pluginbitmaps/pegbox_menu_items.h" #define MENU_X (LCD_WIDTH-BMPWIDTH_pegbox_menu_items)/2 #define MENU_Y BMPHEIGHT_pegbox_menu_top #define ITEM_WIDTH BMPWIDTH_pegbox_menu_items diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 7e6a180193..4dde74a94f 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c @@ -28,8 +28,8 @@ #include "helper.h" #include "bmp.h" #include "picture.h" -#include "pictureflow_logo.h" -#include "pictureflow_emptyslide.h" +#include "pluginbitmaps/pictureflow_logo.h" +#include "pluginbitmaps/pictureflow_emptyslide.h" PLUGIN_HEADER diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 9303985d03..ef33a4f642 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -181,7 +181,7 @@ PLUGIN_HEADER #endif #endif -#include "sliding_puzzle.h" +#include "pluginbitmaps/sliding_puzzle.h" #define IMAGE_WIDTH BMPWIDTH_sliding_puzzle #define IMAGE_HEIGHT BMPHEIGHT_sliding_puzzle #define IMAGE_SIZE IMAGE_WIDTH diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 1bddeb6b3b..a99c646d92 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -38,11 +38,11 @@ PLUGIN_HEADER #define HEIGHT 16 #if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) && (LCD_DEPTH >= 1) -#include "snake2_header1.h" -#include "snake2_header2.h" -#include "snake2_left.h" -#include "snake2_right.h" -#include "snake2_bottom.h" +#include "pluginbitmaps/snake2_header1.h" +#include "pluginbitmaps/snake2_header2.h" +#include "pluginbitmaps/snake2_left.h" +#include "pluginbitmaps/snake2_right.h" +#include "pluginbitmaps/snake2_bottom.h" #define BMPHEIGHT_snake2_header BMPHEIGHT_snake2_header1 #define BMPWIDTH_snake2_header BMPWIDTH_snake2_header1 #endif diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 9ac98fe49f..9b9cd29e0a 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -32,7 +32,7 @@ PLUGIN_HEADER #define SOKOBAN_SAVE_FILE PLUGIN_GAMES_DIR "/sokoban.save" #define SOKOBAN_SAVE_FOLDER "/games" -#include "sokoban_tiles.h" +#include "pluginbitmaps/sokoban_tiles.h" #define SOKOBAN_TILESIZE BMPWIDTH_sokoban_tiles /* SOKOBAN_TILESIZE is the number of pixels for each block. * Set dynamically so all targets can support levels diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 2baea48c8d..d48733461d 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -377,9 +377,9 @@ static char helptext[] = * Misc constants, graphics and other defines */ -#include "card_back.h" -#include "card_deck.h" -#include "solitaire_suitsi.h" +#include "pluginbitmaps/card_back.h" +#include "pluginbitmaps/card_deck.h" +#include "pluginbitmaps/solitaire_suitsi.h" #define CARD_GFX_WIDTH BMPWIDTH_card_back #define CARD_GFX_HEIGHT BMPHEIGHT_card_back diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 401519bdee..f2bf2c4e5f 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -293,7 +293,7 @@ static int control; /* the current board */ static char board[STAR_HEIGHT][STAR_WIDTH]; -#include "star_tiles.h" +#include "pluginbitmaps/star_tiles.h" #define TILE_WIDTH BMPWIDTH_star_tiles #define TILE_HEIGHT (BMPHEIGHT_star_tiles/5) -- cgit v1.2.3