File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ PACKAGE := github.com/runfinch/finch-daemon
1717VERSION := $(shell git describe --match 'v[0-9]* ' --dirty='.modified' --always --tags)
1818GITCOMMIT := $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
1919
20+ ifndef GODEBUG
21+ EXTRA_LDFLAGS += -s -w
22+ endif
23+
2024LDFLAGS := -X $(PACKAGE ) /version.Version=$(VERSION ) -X $(PACKAGE ) /version.GitCommit=$(GITCOMMIT )
2125
2226ifeq ($(STATIC ) ,)
2731 $(info Building Dynamic Binary)
2832endif
2933
34+ LDFLAGS += $(EXTRA_LDFLAGS )
35+
3036.PHONY : build
3137build :
3238 GOOS=linux go build $(if $(GO_BUILDTAGS ) , -tags "$(GO_BUILDTAGS ) ") -ldflags " $( LDFLAGS) " -v -o $(BINARY ) $(PACKAGE ) /cmd/finch-daemon
3339
40+ clean :
41+ @rm -f $(BINARIES )
42+ @rm -rf $(BIN )
43+
3444.PHONY : linux
3545linux :
3646ifneq ($(shell uname) , Linux)
You can’t perform that action at this time.
0 commit comments