2006-08-15 09:33:28 +01:00
|
|
|
# These are external variables, and shouldn't clash with anything else
|
|
|
|
# @CNAME@
|
|
|
|
# @CNAME@_BUILT
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ -z ${@CNAME@_BUILT} ]
|
|
|
|
then
|
|
|
|
@CNAME@="obj/@NAME@"
|
2010-11-25 15:32:52 +00:00
|
|
|
EXTRAS="-D_GNU_SOURCE -DAPP_NAME=\"@NAME@\" ${QTSTUFF}" # TODO: more flags
|
2006-08-15 09:33:28 +01:00
|
|
|
|
|
|
|
echo "Building application ${@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..."
|
|
|
|
|
|
|
|
do_cmd ${CXX} ${CFLAGS} -Iobj -o "${@CNAME@}" ${SRC} ${EXTRAS} || return 1
|
|
|
|
|
|
|
|
print_success "Application built"
|
|
|
|
else
|
|
|
|
print_success "Application up to date"
|
|
|
|
fi
|
|
|
|
|
|
|
|
@CNAME@_BUILT=1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2007-08-08 13:03:18 +01:00
|
|
|
# vim: syntax=sh:@VIM_MODELINE@
|