File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,22 @@ BINDIR ?= $(PREFIX)/bin
1313
1414BINARY = $(addprefix bin/,finch-daemon)
1515
16+ ifndef GODEBUG
17+ EXTRA_LDFLAGS += -s -w
18+ endif
19+
1620.PHONY : build
1721build :
1822 $(eval PACKAGE := github.com/runfinch/finch-daemon)
1923 $(eval VERSION ?= $(shell git describe --match 'v[0-9]* ' --dirty='.modified' --always --tags) )
2024 $(eval GITCOMMIT := $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) )
21- $(eval LDFLAGS := "-X $(PACKAGE ) /version.Version=$(VERSION ) -X $(PACKAGE ) /version.GitCommit=$(GITCOMMIT ) ")
25+ $(eval LDFLAGS := "-X $(PACKAGE ) /version.Version=$(VERSION ) -X $(PACKAGE ) /version.GitCommit=$(GITCOMMIT ) $( EXTRA_LDFLAGS ) ")
2226 GOOS=linux go build -ldflags $(LDFLAGS ) -v -o $(BINARY ) $(PACKAGE ) /cmd/finch-daemon
2327
28+ clean :
29+ @rm -f $(BINARIES )
30+ @rm -rf $(BIN )
31+
2432.PHONY : linux
2533linux :
2634ifneq ($(shell uname) , Linux)
You can’t perform that action at this time.
0 commit comments