2006-07-24 21:55:12 +01:00
|
|
|
# These are external variables, and shouldn't clash with anything else
|
|
|
|
# @NAME@
|
|
|
|
# @NAME@_BUILT
|
|
|
|
#
|
|
|
|
|
|
|
|
# HACK -- this should probably be in the top-level makefile
|
|
|
|
[ -z "${SDCC}" ] && SDCC=sdcc
|
|
|
|
[ -z "${SDCCFLAGS}" ] && SDCCFLAGS="@TODO@"
|
|
|
|
|
|
|
|
if [ -z ${@NAME@_BUILT} ]
|
|
|
|
then
|
|
|
|
@NAME@="obj/@NAME@.hex"
|
|
|
|
EXTRAS="@TODO@" # cflags, libs
|
|
|
|
|
|
|
|
echo "Building firmware ${@NAME@}..."
|
|
|
|
|
2006-07-25 09:54:01 +01:00
|
|
|
do_cmd source src/@NAME@/build.monolithic || return 1
|
2006-07-24 21:55:12 +01:00
|
|
|
|
|
|
|
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
|