summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/Makefile36
-rw-r--r--apps/plugins/SUBDIRS32
-rw-r--r--tools/makesubdirs.inc14
3 files changed, 49 insertions, 33 deletions
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index 5e2ea7bbfd..2dd8ab2e8d 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -48,6 +48,9 @@ DEPFILE = $(OBJDIR)/dep-plugins
48# This sets up 'SRC' based on the files mentioned in SOURCES 48# This sets up 'SRC' based on the files mentioned in SOURCES
49include $(TOOLSDIR)/makesrc.inc 49include $(TOOLSDIR)/makesrc.inc
50 50
51# This sets up 'SUBDIRS' based on the directories mentioned in SUBDIRS
52include $(TOOLSDIR)/makesubdirs.inc
53
51ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock) 54ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock)
52SOURCES = $(SRC) 55SOURCES = $(SRC)
53ELFS := $(SRC:%.c=$(OBJDIR)/%.elf) 56ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)
@@ -56,39 +59,6 @@ OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
56DEFS := $(SRC:%.c=$(OBJDIR)/%.def) 59DEFS := $(SRC:%.c=$(OBJDIR)/%.def)
57DIRS = . 60DIRS = .
58 61
59#######################################
60# Subdirs containing multi-file plugins
61
62#for all targets
63# SUBDIRS += searchengine databox
64SUBDIRS += databox
65
66#for any recorder, iRiver or iPod model
67ifneq (,$(strip $(foreach tgt,RECORDER IRIVER IPOD_COLOR IPOD_VIDEO GIGABEAT,$(findstring $(tgt),$(TARGET)))))
68ifneq (-DIRIVER_IFP7XX,$(TARGET))
69 SUBDIRS += rockboy
70endif
71endif
72
73# chessbox is too big to fit in the 32KB Archos plugin buffer, so we only
74# build for IRIVER and IPOD targets
75ifneq (,$(strip $(foreach tgt,RECORDER ONDIO IRIVER IPOD IAUDIO GIGABEAT,$(findstring $(tgt),$(TARGET)))))
76ifneq (-DIRIVER_IFP7XX,$(TARGET))
77 SUBDIRS += chessbox
78endif
79endif
80
81# For all the colour targets and iriver H1x0
82ifneq (,$(strip $(foreach tgt,IPOD_VIDEO IPOD_NANO IPOD_COLOR IRIVER \
83 IAUDIO_X5 GIGABEAT,$(findstring $(tgt),$(TARGET)))))
84 SUBDIRS += pacbox
85endif
86
87# Build Doom for the H300 and color ipods
88ifneq (,$(strip $(foreach tgt, IRIVER_H300 IPOD_NANO IPOD_COLOR IPOD_VIDEO IAUDIO_X5,$(findstring $(tgt),$(TARGET)))))
89 SUBDIRS += doom
90endif
91
92.PHONY: $(SUBDIRS) 62.PHONY: $(SUBDIRS)
93all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE) 63all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
94 64
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
new file mode 100644
index 0000000000..01d9540531
--- /dev/null
+++ b/apps/plugins/SUBDIRS
@@ -0,0 +1,32 @@
1#ifndef IRIVER_IFP7XX_SERIES
2
3/* For all targets */
4databox
5
6/* For various targets... */
7#if (CONFIG_KEYPAD == RECORDER_PAD) || \
8 (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
9 (CONFIG_KEYPAD == IRIVER_H300_PAD) || \
10 defined(IPOD_COLOR) || \
11 defined(IPOD_VIDEO) || \
12 defined(TOSHIBA_GIGABEAT_F)
13rockboy
14#endif
15
16/* For all targets with a bitmap display */
17#ifdef HAVE_LCD_BITMAP
18chessbox
19#endif
20
21/* For all the colour targets and iriver H1x0 */
22#if defined(HAVE_LCD_COLOR) || defined(IRIVER_H100_SERIES)
23pacbox
24#endif
25
26/* For all the color targets apart from the Gigabeat */
27#if defined(HAVE_LCD_COLOR) && !defined(TOSHIBA_GIGABEAT_F)
28doom
29#endif
30
31
32#endif /* IRIVER_IFP7XX_SERIES */
diff --git a/tools/makesubdirs.inc b/tools/makesubdirs.inc
new file mode 100644
index 0000000000..b233430f78
--- /dev/null
+++ b/tools/makesubdirs.inc
@@ -0,0 +1,14 @@
1# -*- Makefile -*-
2
3# return the list of extra sub-directories to build in the SUBDIRS variable
4
5# This uses the native 'gcc' compiler and not $(CC) since we use the -include
6# option and older gcc compiler doesn't have that. We use one such older
7# compiler for the win32 cross-compiles on Linux.
8#
9# The weird grep -v thing in here is due to Apple's stupidities and is needed
10# to make this do right when used on Mac OS X.
11
12SUBDIRS := $(shell cat SUBDIRS | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
13$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - | \
14grep -v "^\#")