-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
24 lines (18 loc) · 789 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
package = ./cmd/arcdps-log-uploader
ldflags = "-H windowsgui -s -w"
.PHONY: build
build: build_amd64 build_i386
.PHONY: build_amd64
build_amd64: install_build_dependencies
GOOS=windows GOARCH=amd64 go generate $(package)
GOOS=windows GOARCH=amd64 go build -o ./out/arcdps-log-uploader_windows_amd64.exe -ldflags=$(ldflags) $(package)
.PHONY: build_i386
build_i386: install_build_dependencies
GOOS=windows GOARCH=386 go generate $(package)
GOOS=windows GOARCH=386 go build -o ./out/arcdps-log-uploader_windows_386.exe -ldflags=$(ldflags) $(package)
.PHONY: install_build_dependencies
install_build_dependencies:
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
.PHONY: generate
generate: install_build_dependencies
GOOS=windows go generate $(package)