Files
libcoap/scripts/build.sh
T
Olaf Bergmann ebbdc30a52 build.sh: split build steps for platform lwip
Apparently, the vpath magic in the lwip examples' Makefile requires
the lwip files to exist before the server is built. Thus, the build
script now calls make twice: First, to clone the lwip repositories,
and second, to create the actual server application.
2016-06-22 13:41:49 +02:00

32 lines
744 B
Bash
Executable File

#! /bin/sh
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
WITH_TESTS=--enable-tests
fi
config() {
echo "./configure $*"
./configure $*
}
case "${PLATFORM}" in
contiki) config "--disable-tests --disable-documentation --disable-examples" && \
make -C examples/contiki
;;
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
make -C examples/lwip lwip lwip-contrib
make -C examples/lwip
;;
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && \
make
;;
esac
err=$?
if test $err = 0 -a -n "$WITH_TESTS" ; then
tests/testdriver
err=$?
fi
exit $err