summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9ee5c7df87faa2ef31041207c5341a1d5369e8f7 (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
28
29
30
31
# vim: shiftwidth=4 tabstop=4 noexpandtab

DESTDIR=""  # leave empty for the current system or provide a fakeroot here
PREFIX="/usr"

.PHONY: all clean install debug

all:
	make -C python all
	make -C src all

clean:
	make -C python clean
	make -C src clean
	rm -rf .pytest_cache

install: all
	make -C python install DESTDIR=$(abspath $(DESTDIR))
	make -C src install DESTDIR=$(abspath $(DESTDIR))
	install -Dm 644 config/default.json $(DESTDIR)/etc/birdscan/config.json
	install -Dm 644 systemd/birdscan.service $(DESTDIR)$(PREFIX)/lib/systemd/system/birdscan.service
	install -Dm 644 systemd/birdscan.sysusers $(DESTDIR)$(PREFIX)/lib/sysusers.d/birdscan.conf
	install -Dm 644 systemd/birdscan.tmpfiles $(DESTDIR)$(PREFIX)/lib/tmpfiles.d/birdscan.conf
	install -Dm 644 data/html/index.html $(DESTDIR)$(PREFIX)/share/birdscan/html/index.html
	install -Dm 644 data/css/birdscan.css $(DESTDIR)$(PREFIX)/share/birdscan/css/birdscan.css
	install -Dm 644 data/js/birdscan.js $(DESTDIR)$(PREFIX)/share/birdscan/js/birdscan.js
	install -Dm 644 sudo/birdscan $(DESTDIR)/etc/sudoers.d/50_birdscan

debug: all
	make -C src debug