-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 735 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 735 Bytes
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
SERVER_BIN := bin/pirate-server
SERVER_SRC := cmd/pirate-server/main.go $(shell find pirate -type f -name '*.go')
CONFIG := config.yml
DOCKERFILE := Dockerfile
.PHONY: all
all: $(SERVER_BIN)
$(SERVER_BIN): $(SERVER_SRC)
@echo "+ $@"
go build -o $@ $<
.PHONY: run
run: $(SERVER_BIN) $(CONFIG)
@echo "+ $@"
$(SERVER_BIN) -config $(CONFIG)
$(CONFIG):
@echo "+ $@"
cp example-config.yml $@
.PHONY: test
test:
@echo "+ $@"
go test -count 1 github.com/innogames/pirate/...
.PHONY: bench
bench:
@echo "+ $@"
go test -count 1 github.com/innogames/pirate/... -bench=.
.PHONY: docker
docker: $(CONFIG)
@echo "+ $@"
docker build -t innogames/pirate:latest .
.PHONY: clean
clean:
@echo "+ $@"
rm -rf $(dir $(SERVER_BIN))