File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,17 @@ LDFLAGS_BASE := -X $(PACKAGE)/version.Version=$(VERSION) -X $(PACKAGE)/version.G
2727build :
2828ifeq ($(STATIC ) ,)
2929 @echo "Building Dynamic Binary"
30- $(eval LDFLAGS := $(LDFLAGS_BASE))
30+ CGO_ENABLED=1 GOOS=linux go build \
31+ -ldflags "$(LDFLAGS_BASE)" \
32+ -v -o $(BINARY) $(PACKAGE)/cmd/finch-daemon
3133else
3234 @echo "Building Static Binary"
33- $(eval GO_BUILDTAGS := osusergo netgo)
34- $(eval LDFLAGS := $(LDFLAGS_BASE) -extldflags '-static')
35- endif
36- GOOS=linux go build \
37- $(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)") \
38- -ldflags "$(LDFLAGS)" \
35+ CGO_ENABLED=0 GOOS=linux go build \
36+ -tags netgo \
37+ -ldflags "$(LDFLAGS_BASE) -extldflags '-static'" \
3938 -v -o $(BINARY) $(PACKAGE)/cmd/finch-daemon
39+ endif
40+
4041clean :
4142 @rm -f $(BINARIES )
4243 @rm -rf $(BIN )
You can’t perform that action at this time.
0 commit comments