blob: 8af1fc4981775ce60c0df346fbabafcbe3cdd110 [file] [log] [blame]
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +00001#!/usr/bin/env bash
2set -x
3set -e
4
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -07005JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +00007
Alexander Afanasyevd6453cd2015-08-20 21:45:36 -07008pushd ns-3 >/dev/null
9
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -070010git submodule update --init
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +000011
12# Cleanup
Alexander Afanasyevd6453cd2015-08-20 21:45:36 -070013sudo rm -Rf build/ .waf-1* .waf3-1*
14find . -name '*.pyc' | sudo xargs rm -f
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +000015
16# Configure/build in debug mode
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -070017./waf -j1 configure -d debug --enable-modules=ndnSIM --enable-examples --enable-tests $EXTRA_FLAGS
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +000018./waf -j1 build
19
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -070020# Install
21sudo ./waf -j1 install
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +000022
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -070023if has Linux $NODE_LABELS; then
24 sudo ldconfig
25elif has FreeBSD $NODE_LABELS; then
26 sudo ldconfig -a
27fi
Alexander Afanasyevd6453cd2015-08-20 21:45:36 -070028
29popd >/dev/null