This repository has been archived by the owner on Mar 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
94 lines (72 loc) · 2.91 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
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
PROC=$(uname -p)
.PHONY: venv
####### RUN make help <---------
help:
# http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo
@echo "Steps:"
@echo "1. sudo make user"
@echo "2. make ndt"
@echo "3. make oplat"
@echo "4. sudo make iperf"
@echo "5. make speedtest"
@echo "6. sudo make deps"
@echo "7. sudo make venv"
@echo "8. make plugin-httping (plugin, optional)"
@echo "9. make plugin-goresp (plugin, optional)"
@echo "10. sudo make plugin-dnsenc (plugin, optional)"
@echo "11. make plugin-vca (plugin, optional)"
@echo "12. sudo make plugin-vca-deps (plugin, optional)"
@echo "13. sudo make install"
@echo "14. make build"
iperf: ## Install iperf3 command from source, use host arch (no cross compile)
./scripts/make_iperf.sh
ndt: ## Install ndt command for host arch
./scripts/make_ndt.sh
oplat: ## Install oplat command for host arch
./scripts/make_oplat.sh
speedtest: ## Install speedtest command for host arch
./scripts/make_speedtest.sh
plugin-httping: ## Install httping command
./scripts/make_httping.sh
plugin-goresp: ## Install goresponsiveness command
./scripts/make_goresp.sh
plugin-dnsenc: ## Install dig command from source, use host arch (no cross compile)
./scripts/make_dig.sh
deps: ## Install dependencies via apt-get install
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
apt -q -y --fix-broken install
apt-get -q -y install net-tools jq
apt-get -q -y install traceroute
apt-get -q -y install dnsutils
apt-get -q -y install nmap
apt-get -q -y install build-essential
apt-get -q -y install python3-venv
apt-get -q -y install tshark
#apt-get -q -y install chromium-chromedriver #(disabled)
venv: ## Make virtual enviroment and activate it
./scripts/make_venv.sh
ln -s /usr/local/src/nm-exp-active-netrics/venv ./venv
build: ## Build .deb package for the current arch
cd package/deb/; ./build.sh; cp nm-exp-active-netrics*.deb ~/
install: ## Copy files to the device filesystem at /usr/local/src, /usr/local/bin, /etc/init.d/ and /etc/nm-exp-active-netrics
./scripts/make_install.sh
user: ## Make system user group netrics:netrics
./scripts/make_netrics_user_group.sh
plugin-vca:
./scripts/make_vca.sh
plugin-vca-deps:
./scripts/make_vca_deps.sh
clearlogs: ## Remove nm-exp-active-netrics.log
rm -f /tmp/nm/nm-exp-active-netrics/log/nm-exp-active-netrics.log
clearpending: ## Remove /tmp/nm/nm-exp-active-netrics/upload/pending
rm -Rf /tmp/nm/nm-exp-active-netrics/upload/pending
cleararchive: ## Remove /tmp/nm/nm-exp-active-netrics/upload/archive
rm -Rf /tmp/nm/nm-exp-active-netrics/upload/archive
cleantmp: ## Remove /tmp/nm/
rm -Rf /tmp/nm/nm-exp-active-netrics/
clean: ## Clean all /tmp/nm/nm-exp-active-netrics/*
rm -Rf /tmp/nm/nm-exp-active-netrics/
rm -Rf /usr/local/src/nm-exp-active-netrics/