blob: 58d0b01eaa88f8e1461a161f7092d8ee7abc72aa [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
2set -x
Alexander Afanasyev33ce4c32014-10-24 11:19:45 -07003set -e
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04004
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04005JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04007
8sudo rm -Rf /usr/local/include/ndn-cxx
9sudo rm -f /usr/local/lib/libndn-cxx*
10sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
11
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020012# Cleanup
13sudo ./waf -j1 --color=yes distclean
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040014
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040015# Configure/build static library in debug mode with precompiled headers
16./waf -j1 --color=yes configure --enable-static --disable-shared --with-tests --debug
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020017./waf -j1 --color=yes build
18
19# Cleanup
20sudo ./waf -j1 --color=yes distclean
21
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040022# Configure/build static and shared library in optimized mode without tests with precompiled headers
23./waf -j1 --color=yes configure --enable-shared --enable-static
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020024./waf -j1 --color=yes build
25
26# Cleanup
27sudo ./waf -j1 --color=yes distclean
28
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040029# Configure/build shared library in debug mode without precompiled headers
30if has code-coverage $JOB_NAME; then
31 COVERAGE="--with-coverage"
32fi
33./waf -j1 --color=yes configure --debug --enable-shared --disable-static --with-tests --without-pch $COVERAGE
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020034./waf -j1 --color=yes build
35
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040036# (tests will be run against debug version)
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040037
38# Install
39sudo ./waf -j1 --color=yes install
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040040
41if has Linux $NODE_LABELS; then
42 sudo ldconfig
43elif has FreeBSD $NODE_LABELS; then
44 sudo ldconfig -a
45fi