-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (41 loc) · 1.83 KB
/
Makefile
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
VERSION=3.33
# Dependencies work for Ubuntu 20.04
install:
sudo -S sudo apt-get update && sudo apt-get install -y \
build-essential autoconf automake libxmu-dev \
python3-pygraphviz cvs mercurial bzr git cmake \
python3-matplotlib python-tk python3-dev qt5-qmake \
gnuplot-x11 p7zip-full gir1.2-goocanvas-2.0 virtualenv git\
if [ -d "./ns-allinone-$(VERSION)" ]; then \
echo "Dir exists, skip downloading .."; \
else \
git clone https://github.com/agusalex/rssi-filter-profiling \
git clone https://github.com/agusalex/easy-trilateration \
virtualenv env --python=python3 \
env/bin/pip install -r rssi-filter-profiling/requirements.txt; \
env/bin/pip install -r easy-trilateration/requirements.txt; \
wget http://www.nsnam.org/release/ns-allinone-$(VERSION).tar.bz2; \
tar -xf ./ns-allinone-$(VERSION).tar.bz2; \
rm ./ns-allinone-$(VERSION).tar.bz2; \
fi
#cd ns-allinone-$(VERSION) && ./build.py --enable-examples --enable-tests
# cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf configure
copy:
yes | cp -rf src/* ns-allinone-$(VERSION)/ns-$(VERSION)/scratch/
run:
make copy
cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf -v --run 2DTrilateration
vis-1d:
make copy
cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf --run 1DDistanceProfiling --vis
vis-2d:
make copy
cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf --run 1DDistanceProfiling --vis
graph-1d:
make copy
cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf --run 1DDistanceProfiling
env/bin/python rssi-filter-profiling/profiler.py --verbose true --file ns-allinone-$(VERSION)/ns-$(VERSION)/capture_1.csv \
graph-2d:
make copy
cd ns-allinone-$(VERSION)/ns-$(VERSION)/ && ./waf --run 2DTrilateration
env/bin/python easy-trilateration/main.py --file ns-allinone-$(VERSION)/ns-$(VERSION)/capture_combined.csv \