forked from iot-lab/iot-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (58 loc) · 1.72 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
# Add new repositories in REPOS variable
IOTLAB_REPOS = iot-lab.wiki contiki wsn430 openlab cli-tools aggregation-tools
IOTLAB_REPOS += oml-plot-tools
EXTERN_REPOS = riot
REPOS = $(IOTLAB_REPOS) $(EXTERN_REPOS)
SETUP_REPOS = $(sort $(addprefix setup-, $(REPOS)))
help:
@printf "\nWelcome to the IoT-LAB development environment setup.\n\n"
@printf "targets:\n"
@for setup_cmd in $(SETUP_REPOS); do \
printf "\t$${setup_cmd}\n"; \
done
@echo ""
@printf "\tpull\n"
@echo ""
all: $(addprefix setup-, $(REPOS))
ifdef GITHUB_GIT
GITHUB_URL = [email protected]:
else
GITHUB_URL = https://github.com/
endif
# External repositories
setup-riot: parts/RIOT
parts/RIOT:
git clone $(GITHUB_URL)RIOT-OS/RIOT.git $@
parts/contiki:
git clone $(GITHUB_URL)openDSME/contiki.git --branch dsme $@
parts/openlab:
git clone $(GITHUB_URL)openDSME/openlab.git $@
# IoT-Lab repositories
$(addprefix setup-, $(IOTLAB_REPOS)): setup-%: parts/%
parts/%:
git clone $(GITHUB_URL)iot-lab/$*.git $@
# print documentation on release
setup-wsn430: parts/wsn430
cat parts/wsn430/README.md
setup-openlab: parts/openlab
cat parts/openlab/README-IoT-LAB.md
setup-contiki: parts/contiki parts/openlab
cat parts/contiki/README-IoT-LAB.md
# Pull in new changes
pull: $(subst parts/,pull-,$(wildcard parts/*))
git pull
pull-%: parts/%
cd $^; git pull; cd -
#
# Run tests
#
tests: openlab-tests contiki-tests wsn430-tests tools_and_scripts__tests
tools_and_scripts__tests:
bash tools_and_scripts/tests/run_tests.sh
%-tests: parts/%
make -C $^ -f iotlab.makefile tests
tests-clean: openlab-tests-clean contiki-tests-clean wsn430-tests
%-tests-clean: parts/%
make -C $^ -f iotlab.makefile clean
.PHONY: help setup-% pull pull-% tests tests-%
.PRECIOUS: parts/%