-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
55 lines (42 loc) · 860 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
46
47
48
49
50
51
52
53
54
55
TEST_PACKAGE ?= ./...
.PHONY: build
build:
go build -gcflags '-e'
.PHONY: test
test:
go test $(TEST_PACKAGE)
.PHONY: bench
bench:
go test -bench $(TEST_PACKAGE)
.PHONY: tags
tags:
gotags -f tags -R .
.PHONY: cover
cover:
mkdir -p tmp
go test -coverprofile tmp/_cover.out $(TEST_PACKAGE)
go tool cover -html tmp/_cover.out -o tmp/cover.html
.PHONY: checkall
checkall: vet staticcheck
.PHONY: vet
vet:
go vet $(TEST_PACKAGE)
.PHONY: staticcheck
staticcheck:
staticcheck $(TEST_PACKAGE)
.PHONY: clean
clean:
go clean
rm -f tags
rm -f tmp/_cover.out tmp/cover.html
rm -f z80.asm
.PHONY: zexdoc
zexdoc:
$(MAKE) -C cmd/zexdoc run
.PHONY: zexall
zexall:
$(MAKE) -C cmd/zexdoc run-all
# Generate mnemonic for Z80 emulator, which assembled by Go
z80.asm: *.go
go build -gcflags "-S" 2> $@
# based on: github.com/koron-go/_skeleton/Makefile