lw-build-system/scripts/build.firmware.gpasm/build.firmware

43 lines
879 B
Plaintext
Raw Normal View History

# These are external variables, and shouldn't clash with anything else
# @CNAME@
# @CNAME@_BUILT
#
if [ -z ${@CNAME@_BUILT} ]
then
@CNAME@="obj/@NAME@.hex"
EXTRAS="" # @TODO@ cflags, libs
2006-12-08 12:09:08 +00:00
PROCESSOR="16f877" # @TODO@ processor type
echo "Building firmware ${@CNAME@}..."
do_cmd source src/@NAME@/build.monolithic || return 1
MODIFIED=0
for test in ${MONOLITHIC_TESTS} ${SRC}
do
if [ ${test} -nt ${@CNAME@} ]
then
MODIFIED=1
break
fi
done
if [ ${MODIFIED} -ne 0 ]
then
echo " Compiling..."
2006-12-08 15:51:18 +00:00
do_cmd ${GPASM} ${GPASM_FLAGS} -p"${PROCESSOR}" -o "${@CNAME@}" ${SRC} ${EXTRAS} || return 1
print_success "Firmware built"
else
print_success "Firmware up to date"
fi
@CNAME@_BUILT=1
fi
# kate: @KATE_MODELINE@
2007-08-08 13:03:18 +01:00
# vim: syntax=sh:@VIM_MODELINE@