Skip to content

Commit

Permalink
Allow the configure golang flags
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Aug 28, 2024
1 parent abe30d6 commit 77d119e
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
Expand Up @@ -34,6 +34,12 @@ IMAGE_BUILD_OPTS += $(DOCKERARGS)
# Go tools
GO = go
Q = $(if $(filter 1,$V),,@)
# Go settings
GO_BUILD_OPTS ?=CGO_ENABLED=0
GO_LDFLAGS ?=
GO_FLAGS ?=
GO_TAGS ?=-tags no_openssl
export GOPATH?=$(shell go env GOPATH)

.PHONY: all
all: lint build test-coverage
Expand All @@ -48,7 +54,7 @@ build: $(BUILDDIR)/$(BINARY_NAME) ; $(info Building $(BINARY_NAME)...) ## Build
$(info Done!)

$(BUILDDIR)/$(BINARY_NAME): $(GOFILES) | $(BUILDDIR)
@cd $(BASE)/cmd/$(PACKAGE) && CGO_ENABLED=0 $(GO) build -o $(BUILDDIR)/$(BINARY_NAME) -tags no_openssl -ldflags $(LDFLAGS) -v
@cd $(BASE)/cmd/$(PACKAGE) && $(GO_BUILD_OPTS) $(GO) build -o $(BUILDDIR)/$(BINARY_NAME) $(GO_TAGS) -ldflags $(LDFLAGS) -v

# Tools

Expand Down

0 comments on commit 77d119e

Please sign in to comment.