diff --git a/Makefile b/Makefile index 7b025ba..6eb32a5 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,15 @@ CMDDIR=$(shell pwd)/cmd VERSION=$(shell git describe --tags --long || echo "unknown version") BUILD_TAGS='fakeDNS stats' BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)"' -GOBUILD=go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) +DEBUG_BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)-debug"' all: build build: - cd $(CMDDIR) && $(GOBUILD) -o $(BUILDDIR)/$(NAME) + cd $(CMDDIR) && go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) -o $(BUILDDIR)/$(NAME) debug: - cd $(CMDDIR) && $(GOBUILD) -race -o $(BUILDDIR)/$(NAME) + cd $(CMDDIR) && go build -ldflags $(DEBUG_BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) -race -o $(BUILDDIR)/$(NAME) clean: rm -rf $(BUILDDIR) \ No newline at end of file