-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Neb Yelsaw
committed
Sep 6, 2024
1 parent
66777b3
commit 68d8fc7
Showing
1 changed file
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
VERSION := v0.0.1 | ||
APP := gotp | ||
GO_LDFLAGS="-s -extldflags=-static" | ||
|
||
_: linux darwin windows | ||
tar cfv gotp-linux_$(VERSION).tar build/linux/* | ||
tar cfv gotp-darwin_$(VERSION).tar build/darwin/* | ||
zip gotp-windows_$(VERSION).zip build/windows/* | ||
_: rmbuild linux darwin windows | ||
tar cfv build/gotp-linux_v0.0.1.tar build/$(APP)-linux | ||
tar cfv build/gotp-darwin_v0.0.1.tar build/$(APP)-darwin | ||
zip build/gotp-windows_v0.0.1.zip build/$(APP).exe | ||
|
||
clean: | ||
rmbuild: | ||
rm -rf build | ||
|
||
linux: | ||
clean: | ||
@echo "Building ..." | ||
go clean | ||
go get | ||
@GOOS=linux CGO_ENABLED=0 go build -ldflags=$(GO_LDFLAGS) -o build/linux/$(APP)-linux | ||
go get | ||
|
||
linux: clean | ||
@GOOS=linux CGO_ENABLED=0 go build -ldflags=$(GO_LDFLAGS) -o build/$(APP)-linux | ||
@echo "finished" | ||
|
||
darwin: | ||
@echo "Building ..." | ||
go clean | ||
go get | ||
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o build/darwin/$(APP)-darwin | ||
darwin: clean | ||
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o build/$(APP)-darwin | ||
@echo "finished" | ||
|
||
windows: | ||
@echo "Building ..." | ||
go clean | ||
go get | ||
@GOOS=windows go build -ldflags=$(GO_LDFLAGS) -o build/windows/$(APP).exe | ||
windows: clean | ||
@GOOS=windows go build -ldflags=$(GO_LDFLAGS) -o build/$(APP).exe | ||
@echo "finished" | ||
|