lw-build-system/skel/scripts/build.c.app/build.app

41 lines
704 B
Erlang

# These are external variables, and shouldn't clash with anything else
# APPC
# APPC_BUILT
#
if [ -z ${APPC_BUILT} ]
then
APP="obj/@P@"
LIBS=""
echo "Building application ${APP}..."
source src/capp/build.monolithic
MODIFIED=0
for test in ${MONOLITHIC_TESTS} ${SRC}
do
if [ ${test} -nt ${APP} ]
then
MODIFIED=1
break
fi
done
if [ ${MODIFIED} -ne 0 ]
then
echo " Compiling"
do_cmd ${CC} ${CFLAGS} -o "${APP}" \
${SRC} ${LIBS} || return 1
print_success "Application built"
else
print_success "Application up to date"
fi
APPC=${APP}
APPC_BUILT=1
fi