mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-08 18:20:41 +08:00
update makefile
This commit is contained in:
6
Makefile
6
Makefile
@@ -4,15 +4,15 @@ CMDDIR=$(shell pwd)/cmd
|
|||||||
VERSION=$(shell git describe --tags --long || echo "unknown version")
|
VERSION=$(shell git describe --tags --long || echo "unknown version")
|
||||||
BUILD_TAGS='fakeDNS stats'
|
BUILD_TAGS='fakeDNS stats'
|
||||||
BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)"'
|
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
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cd $(CMDDIR) && $(GOBUILD) -o $(BUILDDIR)/$(NAME)
|
cd $(CMDDIR) && go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) -o $(BUILDDIR)/$(NAME)
|
||||||
|
|
||||||
debug:
|
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:
|
clean:
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $(BUILDDIR)
|
Reference in New Issue
Block a user