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)