-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 752 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (35 loc) · 752 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
.DEFAULT_GOAL := build
# format code
fmt:
go fmt ./...
.PHONY:fmt
# check code for best practices
lint: fmt
golint ./...
.PHONY:lint
# Check code for correctness
vet: fmt
go vet ./...
.PHONY:vet
# Build executable in current OS
build: vet
go build .
.PHONY:build
# Build Linux executable
genlinux: vet
CGO_ENABLED=0 go build -o build/innotopgo-linux_static .
.PHONY:genlinux
# Build Windows executable
genwin: vet
CGO_ENABLED=0 GOOS=windows go build -o build/innotopgo-win.exe .
.PHONY:genwin
# Build MacOS executable
genmac: vet
CGO_ENABLED=0 GOOS=darwin go build -o build/innotopgo-macos .
.PHONY:genmac
# Build for Debug
debug: vet
go build -gcflags="all=-N -l" .
.PHONY:debug
# Build all executables
genall: genmac genwin genlinux