blob: f25f060a75abf55e5203690e8e7d995c1dd5fbad [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
Eric Newberry00f38392017-11-01 15:21:35 -070017./waf -j${WAF_JOBS:-1} configure -d debug --enable-modules=ndnSIM --enable-examples --enable-tests $EXTRA_FLAGS
18./waf -j${WAF_JOBS:-1} build
Alexander Afanasyev8e60bcd2015-01-15 20:55:40 +000019
Yuanzhi Gaodd516fe2015-04-23 04:18:24 -070020# Install
Eric Newberry00f38392017-11-01 15:21:35 -070021sudo ./waf -j${WAF_JOBS:-1} 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