-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add build flags to reduce binary size
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 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,11 +1,12 @@ | ||
flags = "-X main.appVersion=`cat VERSION`" | ||
flags := -X main.appVersion=`cat VERSION` | ||
build_flags := $(flags) -s -w | ||
|
||
install: | ||
godep go install -ldflags $(flags) | ||
godep go install -ldflags "$(flags)" | ||
.PHONY: install | ||
|
||
build: | ||
GOOS=darwin godep go build -ldflags $(flags) -o tmp/codeposter-oxs-$$(cat VERSION) | ||
GOOS=linux godep go build -ldflags $(flags) -o tmp/codeposter-linux-$$(cat VERSION) | ||
GOOS=windows godep go build -ldflags $(flags) -o tmp/codeposter-windows-$$(cat VERSION) | ||
.PHONY: install | ||
GOOS=darwin godep go build -ldflags "$(build_flags)" -o tmp/codeposter-oxs-$$(cat VERSION) | ||
GOOS=linux godep go build -ldflags "$(build_flags)" -o tmp/codeposter-linux-$$(cat VERSION) | ||
GOOS=windows godep go build -ldflags "$(build_flags)" -o tmp/codeposter-windows-$$(cat VERSION) | ||
.PHONY: build |