forked from DLR-TS/ics-transaid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_all.sh
executable file
·101 lines (92 loc) · 2.42 KB
/
build_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#! /bin/bash
# This builds or rebuilds sumo, ns-3, iCS, LightComm and all apps
# It understands the configurations "debug" and "profile" as parameter
#
# Please note that you have to install additional dependencies before
# the build will succeed. These are currently (Ubuntu 18.04):
# SUMO: cmake, libxerces-c-dev, libgdal-dev, libproj-dev, libfox-1.6-dev
# iTETRIS: autoconf, make and the Geographic Lib, which you need to install
# manually: Download the latest Linux tarball from
# https://sourceforge.net/projects/geographiclib/files/latest/download
# Unpack it and type ./configure && make -j8 && sudo make install
if test "$1" == "debug"; then
cmake_opt="-DCMAKE_BUILD_TYPE=Debug"
config_opt="--enable-debug"
waf_opt="--build-profile=debug"
waf_flags="-std=c++11 -g"
fi
if test "$1" == "profile"; then
export CXXFLAGS=-pg
config_opt="--enable-debug"
cmake_opt="-DCMAKE_BUILD_TYPE=Debug -DPROFILING=ON"
waf_flags="-std=c++11"
fi
mkdir -p sumo/build/cmake-build$1
cd sumo/build/cmake-build$1
echo "## Building sumo in $PWD..."
cmake ../.. -DSUMO_UTILS=TRUE $cmake_opt -DCMAKE_INSTALL_PREFIX=$PWD/../../..
if ! make install -j8; then
echo "### Build failed!"
cd ../../..
exit 1
fi
cd ../../..
cd ns-3.20
echo "## Building ns-3 in $PWD..."
CXXFLAGS="$waf_flags" python2 ./waf configure $waf_opt --prefix=$PWD/..
if ! python2 ./waf -j8; then
echo "### Build failed!"
cd ..
exit 1
fi
./waf install
cd ..
cd iCS
echo "## Building iCS in $PWD..."
autoreconf -i
./configure $config_opt --prefix=$PWD/..
if ! make install -j8; then
echo "### Build failed!"
cd ..
exit 1
fi
cd ..
cd iTETRIS-Applications
cd baseApp
echo "## Building baseApp in $PWD..."
autoreconf -i
./configure $config_opt --prefix=$PWD/../..
if ! make install -j8; then
echo "### Build failed!"
cd ../..
exit 1
fi
cd ..
for app in *; do
if test $app = "baseApp"; then
continue
fi
cd $app
if test -e configure.ac; then
echo "## Building app in $PWD..."
autoreconf -i
./configure $config_opt --prefix=$PWD/../..
if ! make install -j8; then
echo "### Build failed!"
cd ../..
exit 1
fi
fi
cd ..
done
cd ..
cd LightCommSimulator
echo "## Building LightComm in $PWD..."
autoreconf -i
./configure $config_opt --prefix=$PWD/..
if ! make install -j8; then
echo "### Build failed!"
cd ..
exit 1
fi
cd ..