summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-03-07 12:45:45 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-03-07 12:45:45 +0000
commiteed02bebcdc921557bebcc20221c112d41263ffe (patch)
tree754650cad62fc03c3c8d43421793e682635f3b66
parent3de0db0c3b0c2010ffb5c5884e8ec5ec260091d6 (diff)
downloadrockbox-eed02bebcdc921557bebcc20221c112d41263ffe.tar.gz
rockbox-eed02bebcdc921557bebcc20221c112d41263ffe.zip
Add the target directory tree to the include path, and set the TARGET_TREE macro for the targets that use it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8945 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--bootloader/Makefile2
-rw-r--r--firmware/Makefile2
-rwxr-xr-xtools/configure14
3 files changed, 16 insertions, 2 deletions
diff --git a/bootloader/Makefile b/bootloader/Makefile
index d1a17df56a..a524e6348e 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -7,7 +7,7 @@
# $Id$
#
-INCLUDES= -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR) \
+INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(OBJDIR) \
-I$(BUILDDIR)
DEPFILE = $(OBJDIR)/dep-bootloader
diff --git a/firmware/Makefile b/firmware/Makefile
index 41485da861..a35a1205b6 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -7,7 +7,7 @@
# $Id$
#
-INCLUDES=-Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BUILDDIR)
+INCLUDES=$(TARGET_INC) -Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BUILDDIR)
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(EXTRA_DEFINES) \
-DMEM=${MEMORYSIZE}
diff --git a/tools/configure b/tools/configure
index dd84525eb4..aef943cfd3 100755
--- a/tools/configure
+++ b/tools/configure
@@ -714,6 +714,11 @@ toolsdir='\$(ROOTDIR)/tools'
# toolset is the tools within the tools directory that we build for
# this particular target.
toolset="$iaudiobitmaptools"
+
+ # architecture, manufacturer and model for the target-tree build
+ t_cpu="coldfire"
+ t_manufactorer="iaudio"
+ t_model="x5"
;;
13)
@@ -1075,6 +1080,13 @@ sed > autoconf.h \
#endif /* __BUILD_AUTOCONF_H */
EOF
+if test -n "$t_cpu"; then
+ TARGET_INC="-I\$(FIRMDIR)/target/$t_cpu/$t_manufactorer/$t_model"
+ TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufactorer"
+ TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu"
+ GCCOPTS="$GCCOPTS -DTARGET_TREE"
+fi
+
if test "$simulator" = "yes"; then
# add simul make stuff on the #SIMUL# line
simmagic1="s,@SIMUL1@,@\$(MAKE) -C \$(SIMDIR) OBJDIR=\$(BUILDDIR)/sim,"
@@ -1116,6 +1128,7 @@ sed > Makefile \
-e "s,@CODECS@,${codecs},g" \
-e "s,@PROFILE_OPTS@,${PROFILE_OPTS},g" \
-e "s,@GCCOPTS@,${GCCOPTS},g" \
+ -e "s,@TARGET_INC@,${TARGET_INC},g" \
-e "s!@LDOPTS@!${LDOPTS}!g" \
-e "s,@LOADADDRESS@,${loadaddress},g" \
-e "s,@EXTRADEF@,${extradefines},g" \
@@ -1178,6 +1191,7 @@ export DLLWRAP=@DLLWRAP@
export RANLIB=@RANLIB@
export PROFILE_OPTS=@PROFILE_OPTS@
export GCCOPTS=@GCCOPTS@
+export TARGET_INC=@TARGET_INC@
export LOADADDRESS=@LOADADDRESS@
export SIMVER=@SIMVER@
export SIMDIR=\$(ROOTDIR)/uisimulator/\$(SIMVER)