build: use a different .toolchain-* file for each toolchian.

This commit is contained in:
Solomon Peachy 2013-08-03 20:43:28 -04:00
parent 9a7ec60436
commit 0af35f521f
1 changed files with 7 additions and 5 deletions

View File

@ -60,11 +60,13 @@ distclean: clean
MAKELEVEL='' make clean ; \
MAKELEVEL='' make distclean ; \
fi
@${RM} -f .toolchain
@${RM} -f .toolchain-$(MCU_CORE)
$(Q)${RM} -f tags TAGS
# Toolchain
.toolchain:
.toolchain: .toolchain-$(MCU_CORE)
.toolchain-$(MCU_CORE):
$(Q)if [ ! -x ${CROSS_COMPILE}gcc ] ; then \
( unset AS LD LDD CC CPP AR NM STRIP STRIPTOOL OBJCOPY OBJDUMP RANLIB LD_LIBRARY_PATH MAKELEVEL ; \
if [ -r ${TOOLCHAIN_CONFIG} ] ; then \
@ -85,14 +87,14 @@ distclean: clean
${ECHO} "Toolchain Build failed!" ; \
exit 1 ;\
fi
@touch .toolchain
@touch .toolchain-$(MCU_CORE)
toolclean:
$(Q)if [ -d ${CROSS_DIR} ] ; then \
chmod -R +w ${CROSS_DIR} ; \
${RM} -fr ${CROSS_DIR} ; \
fi
@${RM} -f .toolchain
@${RM} -f .toolchain-$(MCU_CORE)
tags:
find . -path '*crosstool*' -prune \
@ -100,7 +102,7 @@ tags:
| etags -
dep: .toolchain
dep: .toolchain-$(MCU_CORE)
$(Q)rm -f $(DEPFILE)
$(Q)make $(DEPFILE)