Skip to content

Commit

Permalink
Small Makefile modification to bring down binary size.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso committed Jul 8, 2018
1 parent 2331b9b commit 640e500
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
NAME=gaia
GO_LDFLAGS_STATIC=-ldflags "-s -w -extldflags -static"

default: dev

dev:
Expand All @@ -17,6 +20,9 @@ static_assets:
rice embed-go

compile_backend:
env GOOS=linux GOARCH=amd64 go build -o gaia-linux-amd64 ./cmd/gaia/main.go
env GOOS=linux GOARCH=amd64 go build $(GO_LDFLAGS_STATIC) -o $(NAME)-linux-amd64 ./cmd/gaia/main.go

test:
go test -v ./...

release: compile_frontend static_assets compile_backend

0 comments on commit 640e500

Please sign in to comment.