From 987e3023e60e34a736dfbdc407a5effcf30b4db5 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 14 Aug 2019 11:37:01 +0800 Subject: [PATCH] update makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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