🔧 Update Makefile and .gitignore
Add go compiler flag to makefile Add makefile target with debug compiler flag Exclude Idea project file
This commit is contained in:
parent
c19cb27251
commit
a6aa1ff2d2
4
.gitignore
vendored
4
.gitignore
vendored
@ -18,4 +18,6 @@ site/
|
||||
|
||||
# Editors
|
||||
.vscode/
|
||||
.local/
|
||||
.local/
|
||||
.idea/
|
||||
*.iml
|
||||
6
Makefile
6
Makefile
@ -33,6 +33,7 @@ TAGS :=
|
||||
TESTS := .
|
||||
TESTFLAGS :=
|
||||
LDFLAGS := -w -s -X github.com/rancher/k3d/version.Version=${GIT_TAG} -X github.com/rancher/k3d/version.K3sVersion=${K3S_TAG}
|
||||
GCFLAGS :=
|
||||
GOFLAGS :=
|
||||
BINDIR := $(CURDIR)/bin
|
||||
BINARIES := k3d
|
||||
@ -68,8 +69,11 @@ LINT_DIRS := $(DIRS) $(foreach dir,$(REC_DIRS),$(dir)/...)
|
||||
|
||||
all: clean fmt check build
|
||||
|
||||
build-debug: GCFLAGS+="all=-N -l"
|
||||
build-debug: build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 $(GO) build $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)/$(BINARIES)'
|
||||
CGO_ENABLED=0 $(GO) build $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -gcflags '$(GCFLAGS)' -o '$(BINDIR)/$(BINARIES)'
|
||||
|
||||
build-cross: LDFLAGS += -extldflags "-static"
|
||||
build-cross:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user