summaryrefslogtreecommitdiff
path: root/Makefile
blob: e3cc8e175e431bc7541a825dbf46ecc9c57e791b (plain)
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
KERNEL ?= $(shell uname -r)
DESTDIR=/opt/ioriot
all:
	$(MAKE) -C systemtap
	$(MAKE) -C ioriot
install:
	$(MAKE) -C systemtap install
	$(MAKE) -C ioriot install
uninstall:
	test ! -z $(DESTDIR) && test -d $(DESTDIR) && rm -Rfv $(DESTDIR) || exit 0
deinstall: uninstall
clean:
	$(MAKE) -C ioriot clean
	$(MAKE) -C systemtap clean
astyle:
	$(MAKE) -C ioriot astyle
loc:
	wc -l ./systemtap/src/*.stp ./ioriot/src/*.{h,c} ./ioriot/src/*/*.{h,c} | tail -n 1
doxygen:
	doxygen ./docs/doxygen.conf
test:
	$(MAKE) -C ioriot test
dockerbuild:
	sed s/KERNEL/$(KERNEL)/ Dockerfile.in > Dockerfile
	docker build . -t ioriot:$(KERNEL)
	bash -c 'test ! -d /tmp/docker/opt/ && mkdir -p /tmp/docker/opt/; exit 0'
	docker run -v /tmp/docker/opt:/opt -v /tmp/docker/downloads:/ioriot/systemtap/downloads -e 'KERNEL=$(KERNEL)' -it ioriot:$(KERNEL) make all install