-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (37 loc) · 931 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
43
44
45
.DEFAULT_GOAL := build
fmt:
go fmt ./...
.PHONY:fmt
lint: fmt
golint ./...
.PHONY:lint
vet: fmt
go vet ./...
.PHONY:vet
build: test
rm -rf bin
mkdir bin
cp -Rp cmd/npcGen/data bin
cp -Rp cmd/npcGen/templates bin
export GOARCH=amd64 GOOS=linux; go build -o bin/npcGen_$${GOOS}.$${GOARCH} cmd/npcGen/main.go
export GOARCH=arm64 GOOS=linux; go build -o bin/npcGen_$${GOOS}.$${GOARCH} cmd/npcGen/main.go
export GOARCH=amd64 GOOS=darwin; go build -o bin/npcGen_$${GOOS}.$${GOARCH} cmd/npcGen/main.go
export GOARCH=amd64 GOOS=windows; go build -o bin/npcGen_$${GOOS}.$${GOARCH} cmd/npcGen/main.go
.PHONY:build
test: vet
go test ./...
.PHONY:test
longtest: vet
go test -count 1000 -timeout 30m ./...
.PHONY:longtest
distro: build
rm -rf tmp
mkdir tmp
cp docs/README.txt bin
cd bin && zip -r ../tmp/npcGen.zip .
.PHONY:distro
clean:
# this may be OBE
rm cmd/npcGen/npcGen
rm cmd/crewgen/crewgen
.PHONY:clean