Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 7 | |
Alexander Afanasyev | d6453cd | 2015-08-20 21:45:36 -0700 | [diff] [blame] | 8 | pushd ns-3 >/dev/null |
| 9 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 10 | git submodule update --init |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 11 | |
| 12 | # Cleanup |
Alexander Afanasyev | d6453cd | 2015-08-20 21:45:36 -0700 | [diff] [blame] | 13 | sudo rm -Rf build/ .waf-1* .waf3-1* |
| 14 | find . -name '*.pyc' | sudo xargs rm -f |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 15 | |
| 16 | # Configure/build in debug mode |
Alexander Afanasyev | 77f84c6 | 2018-10-08 13:37:42 -0400 | [diff] [blame] | 17 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" |
| 18 | ./waf -j${WAF_JOBS:-1} configure -d debug --enable-examples --enable-tests $EXTRA_FLAGS |
| 19 | ./waf -j${WAF_JOBS:-1} build |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 20 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 21 | # Install |
Eric Newberry | 00f3839 | 2017-11-01 15:21:35 -0700 | [diff] [blame] | 22 | sudo ./waf -j${WAF_JOBS:-1} install |
Alexander Afanasyev | 8e60bcd | 2015-01-15 20:55:40 +0000 | [diff] [blame] | 23 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 24 | if has Linux $NODE_LABELS; then |
| 25 | sudo ldconfig |
| 26 | elif has FreeBSD $NODE_LABELS; then |
| 27 | sudo ldconfig -a |
| 28 | fi |
Alexander Afanasyev | d6453cd | 2015-08-20 21:45:36 -0700 | [diff] [blame] | 29 | |
| 30 | popd >/dev/null |