-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (30 loc) · 887 Bytes
/
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
# Gahoot - Distributed, FOSS rewrite of Kahoot! in GO
# Copyright 2022 - Ethan Marshall
.POSIX:
SRV_SRC = main.go front.go play.go api.go ver.go \
config/conf.go config/parse.go \
game/game.go game/doc.go game/coordinator.go game/client.go game/host.go game/player.go game/action.go \
game/quiz/quiz.go game/quiz/manager.go
EXE = gahoot
TSC_SRC = frontend/src/index.ts frontend/src/play.ts frontend/src/host.ts frontend/src/find.ts
TSC_OUT = frontend/static/js/
TSC_DEP = frontend/node_modules
all: server frontend
server: ${EXE}
frontend: ${TSC_OUT}
test:
go test ./...
${EXE}: ${SRV_SRC}
go build .
${TSC_OUT}: ${TSC_SRC} ${TSC_DEP}
cd frontend && npm run build
./scripts/pack
${TSC_DEP}:
cd frontend && npm install
watch:
./scripts/watch
clean:
rm -f ${EXE}
rm -rf frontend/static/js/
rm -rf frontend/.genjs/
.PHONY: clean test watch frontend server