aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
blob: c8ee401f3bc88335b3b843af3fea0fde5a17abf6 (plain) (blame)
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
BIN:= nonsense-time
SERVICE:= nonsense-time.service
STATIC := ./static/
TEMPLATES := ./templates/

.PHONY: all test clean build install info

all: build

build: $(BIN)

install: $(BIN)
	rm -rf /usr/local/share/nonsense-time
	cp $(BIN) /usr/bin
	cp $(SERVICE) /etc/systemd/system/
	mkdir /usr/local/share/nonsense-time
	cp -r $(STATIC) /usr/local/share/nonsense-time
	cp -r $(TEMPLATES) /usr/local/share/nonsense-time

test:
	go test ./...

clean:
	go mod tidy

info:
	@echo "BIN: $(BIN)"
	@echo "SERVICE: $(SERVICE)"

nonsense-time: nonsense-time.go
	go build .