mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-30 06:25:48 +03:00
30 lines
716 B
Bash
Executable File
30 lines
716 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" && \
|
|
cd examples/contiki && make V=1 contiki all
|
|
;;
|
|
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
|
|
cd examples/lwip && make lwip lwip-contrib all
|
|
;;
|
|
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
|