-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 734 Bytes
/
Makefile
File metadata and controls
45 lines (34 loc) · 734 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
41
42
43
44
45
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GORUN=$(GOCMD) run
GOGEN=$(GOCMD) generate
OUTDIR=out
MAIN_PRIME=cmd/grs/main.go
OUT_PRIME=out/grs
GENERATED=grs_stat_strings.go ui/gui_event_strings.go
VERSION=`head -n 1 VERSION.txt`
.PHONY: all
all: test build
.PHONY: build
build: $(OUT_PRIME)
.PHONY: test
test: $(GENERATED)
$(GOTEST) -v jcheng/grs jcheng/grs/shexec
.PHONY: clean
clean:
rm -rf $(OUTDIR)
$(GENERATED): grs_stat.go
$(GOGEN) .../ .../ui
install: all
mv $(OUT_PRIME) $(HOME)/bin
run:
$(GORUN) $(MAIN_PRIME)
.PHONY: fmt
fmt:
gofmt -s -w ./
golangci-lint run
out/grs: $(GENERATED)
$(GOBUILD) -ldflags "-X main.Version=$(VERSION)" -o $(OUT_PRIME) $(MAIN_PRIME)