-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (43 loc) · 1.39 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
.PHONY: all setup install deb build run
all:
@echo "run -- Basic run the program"
@echo "install -- Installs and enable service. Uses DESTDIR"
@echo "build -- Builds the React frontend and Go program"
@echo "deb -- Creates a debian package"
@echo "serve -- Run parcel in serve mode,. to iterate on frontend development"
DESTDIR:=/
install: build
mkdir -p $(DESTDIR)/usr/bin/
cp -a backend/aseqrc $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/etc/systemd/system/
cp etc/systemd-aseqrc.service $(DESTDIR)/etc/systemd/system/
mkdir -p $(DESTDIR)/etc/avahi/services/
cp etc/avahi-aseqrc.service $(DESTDIR)/etc/avahi/services/
mkdir -p $(DESTDIR)/var/lib/aseqrc/
PARCEL:=node_modules/.bin/parcel
build: build-frontend build-backend
build-frontend: static/index.html
frontend/node_modules: setup
cd frontend && make setup
static/index.html: frontend/node_modules frontend/src/*.tsx
cd frontend && make build
build-backend: aseqrc
aseqrc: static/index.html backend/*.go backend/alsaseq/*.go
cd backend && make build
cp backend/aseqrc .
run: build
@echo
@echo
@echo Remember that you can start the frontend as serve, and just reload the page for frontend development.
@echo At http://localhost:8001/static/
@echo
@echo
DEVEL=1 ./aseqrc
serve:
cd frontend && make serve
deb: clean
dpkg-buildpackage --no-sign -d
clean:
cd backend && make clean
cd frontend && make clean
rm aseqrc -rf