2006-07-25 19:00:04 +01:00
|
|
|
# These are external variables, and shouldn't clash with anything else
|
|
|
|
# @NAME@
|
|
|
|
# @NAME@_BUILT
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ -z ${@NAME@_BUILT} ]
|
|
|
|
then
|
|
|
|
@NAME@="obj/@NAME@"
|
2006-07-25 20:22:00 +01:00
|
|
|
EXTRAS="" # @TODO@ cflags, libs
|
2006-07-25 19:00:04 +01:00
|
|
|
|
|
|
|
echo "Building application ${@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..."
|
|
|
|
|
2006-07-25 20:19:46 +01:00
|
|
|
do_cmd ${CC} ${CFLAGS} -o "${@CNAME@}" ${SRC} ${EXTRAS} || return 1
|
2006-07-25 19:00:04 +01:00
|
|
|
|
|
|
|
print_success "Application built"
|
|
|
|
else
|
|
|
|
print_success "Application up to date"
|
|
|
|
fi
|
|
|
|
|
|
|
|
@NAME@_BUILT=1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2006-07-25 19:19:59 +01:00
|
|
|
# kate: @KATE_MODELINE@
|
|
|
|
# vim: @VIM_MODELINE@
|