Create a local copy of the scripts directory.

The idea is to move the build system out of the project tree as much as
possible. This has two benefits:
 - it does not add any baggage to somebody who just wants to compile the
   project, and doesn't want to create any new modules,
 - it means that project trees don't have to be updated every time a
   change is made to the module instantiation stuff.
This commit is contained in:
Laurence Withers 2006-07-25 19:00:04 +01:00
commit 87272247fb
65 changed files with 1561 additions and 0 deletions

View file

@ -0,0 +1,41 @@
# These are external variables, and shouldn't clash with anything else
# @NAME@
# @NAME@_BUILT
#
if [ -z ${@NAME@_BUILT} ]
then
@NAME@="obj/@NAME@.hex"
EXTRAS="@TODO@" # cflags, libs
echo "Building firmware ${@NAME@}..."
do_cmd source src/@NAME@/build.monolithic || return 1
MODIFIED=0
for test in ${MONOLITHIC_TESTS} ${SRC}
do
if [ ${test} -nt ${@NAME@} ]
then
MODIFIED=1
break
fi
done
if [ ${MODIFIED} -ne 0 ]
then
echo " Compiling..."
do_cmd ${SDCC} ${SDCCFLAGS} -o "${@NAME@}" ${SRC} ${EXTRAS} || return 1
print_success "Firmware built"
else
print_success "Firmware up to date"
fi
@NAME@_BUILT=1
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4