Support for a colon-separated path in APPEXTRA


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7663 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/Makefile b/apps/Makefile
index 04e0e87..0c888a1 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -30,8 +30,8 @@
 DIRS = .
 
 ifdef APPEXTRA
-   DIRS += $(APPEXTRA)
-   INCLUDES += -I$(APPEXTRA)
+   DIRS += $(subst :, ,$(APPEXTRA))
+   INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
 endif
 
 CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES)			\
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile
index b29ed73..2c1cd93 100644
--- a/apps/codecs/Makefile
+++ b/apps/codecs/Makefile
@@ -13,7 +13,7 @@
  -DMEM=${MEMORYSIZE} -DCODEC
 
 ifdef APPEXTRA
-   INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 ifdef SOFTWARECODECS
diff --git a/apps/codecs/Tremor/Makefile b/apps/codecs/Tremor/Makefile
index d721d1c..4eadd24 100644
--- a/apps/codecs/Tremor/Makefile
+++ b/apps/codecs/Tremor/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 TREMOROPTS = -O2
diff --git a/apps/codecs/lib/Makefile b/apps/codecs/lib/Makefile
index 52eaf0e..49be70a 100644
--- a/apps/codecs/lib/Makefile
+++ b/apps/codecs/lib/Makefile
@@ -14,7 +14,7 @@
  -I$(FIRMDIR)/common -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 CFLAGS = $(GCCOPTS) \
diff --git a/apps/codecs/libFLAC/Makefile b/apps/codecs/libFLAC/Makefile
index 9da55ba..4008479 100644
--- a/apps/codecs/libFLAC/Makefile
+++ b/apps/codecs/libFLAC/Makefile
@@ -12,7 +12,7 @@
  -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 NEWGCC=$(shell expr $(GCCNUM) ">" 303)
diff --git a/apps/codecs/liba52/Makefile b/apps/codecs/liba52/Makefile
index b31903f..54542c0 100644
--- a/apps/codecs/liba52/Makefile
+++ b/apps/codecs/liba52/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 A52OPTS =  
diff --git a/apps/codecs/libalac/Makefile b/apps/codecs/libalac/Makefile
index b815db5..5bffb06 100644
--- a/apps/codecs/libalac/Makefile
+++ b/apps/codecs/libalac/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 ALACOPTS = -O3
diff --git a/apps/codecs/libffmpegFLAC/Makefile b/apps/codecs/libffmpegFLAC/Makefile
index 240ce28..410b95b 100644
--- a/apps/codecs/libffmpegFLAC/Makefile
+++ b/apps/codecs/libffmpegFLAC/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 FLACOPTS = -O2
diff --git a/apps/codecs/libmad/Makefile b/apps/codecs/libmad/Makefile
index a6f3101..14c25c6 100644
--- a/apps/codecs/libmad/Makefile
+++ b/apps/codecs/libmad/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 # NOTE: FPM_ define has been moved to global.h
diff --git a/apps/codecs/libmusepack/Makefile b/apps/codecs/libmusepack/Makefile
index 79ebffe..6912f74 100644
--- a/apps/codecs/libmusepack/Makefile
+++ b/apps/codecs/libmusepack/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 MUSEPACKOPTS = -O2
diff --git a/apps/codecs/libwavpack/Makefile b/apps/codecs/libwavpack/Makefile
index 75b9060..6b9461b 100644
--- a/apps/codecs/libwavpack/Makefile
+++ b/apps/codecs/libwavpack/Makefile
@@ -11,7 +11,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 CFLAGS = $(GCCOPTS) \
diff --git a/apps/plugins/Makefile b/apps/plugins/Makefile
index c7aa438..ec75876 100644
--- a/apps/plugins/Makefile
+++ b/apps/plugins/Makefile
@@ -13,7 +13,7 @@
  -DMEM=${MEMORYSIZE} -DPLUGIN
 
 ifdef APPEXTRA
-   INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 ifdef SOFTWARECODECS
diff --git a/apps/plugins/databox/Makefile b/apps/plugins/databox/Makefile
index a8a6baa..12b211d 100644
--- a/apps/plugins/databox/Makefile
+++ b/apps/plugins/databox/Makefile
@@ -13,7 +13,7 @@
  -DMEM=${MEMORYSIZE} -DPLUGIN
 
 ifdef APPEXTRA
-    INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 LINKFILE := $(OBJDIR)/link.lds
diff --git a/apps/plugins/lib/Makefile b/apps/plugins/lib/Makefile
index 7eddccd..9b4b0b6 100644
--- a/apps/plugins/lib/Makefile
+++ b/apps/plugins/lib/Makefile
@@ -14,7 +14,7 @@
  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR)
 
 ifdef APPEXTRA
-INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 CFLAGS = $(GCCOPTS) \
diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile
index 1d32e0a..23c6142 100644
--- a/apps/plugins/rockboy/Makefile
+++ b/apps/plugins/rockboy/Makefile
@@ -13,7 +13,7 @@
  -DMEM=${MEMORYSIZE} -DPLUGIN
 
 ifdef APPEXTRA
-    INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 LINKFILE := $(OBJDIR)/link.lds
diff --git a/apps/plugins/searchengine/Makefile b/apps/plugins/searchengine/Makefile
index 992beb0..26e8517 100644
--- a/apps/plugins/searchengine/Makefile
+++ b/apps/plugins/searchengine/Makefile
@@ -13,7 +13,7 @@
  -DMEM=${MEMORYSIZE} -DPLUGIN
 
 ifdef APPEXTRA
-    INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
+   INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
 endif
 
 LINKFILE := $(OBJDIR)/link.lds
diff --git a/bootloader/Makefile b/bootloader/Makefile
index c2bc54a..d1a17df 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -22,8 +22,8 @@
 DIRS = .
 
 ifdef APPEXTRA
-   DIRS += $(APPEXTRA)
-   INCLUDES += -I$(APPEXTRA)
+   DIRS += $(subst :, ,$(APPEXTRA))
+   INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
 endif
 
 ifndef VERSION
diff --git a/flash/bootbox/Makefile b/flash/bootbox/Makefile
index e08c26f..3355238 100644
--- a/flash/bootbox/Makefile
+++ b/flash/bootbox/Makefile
@@ -22,8 +22,8 @@
 DIRS = .
 
 ifdef APPEXTRA
-   DIRS += $(APPEXTRA)
-   INCLUDES += -I$(APPEXTRA)
+   DIRS += $(subst :, ,$(APPEXTRA))
+   INCLUDES += $(patsubst %,-I%,$(subst :, ,$(APPEXTRA)))
 endif
 
 CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES)			\