mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2026-10-19 16:16:35 +00:00
fix build crash
This commit is contained in:
@@ -4,15 +4,17 @@ CMD_DIR=$(shell pwd)/cmd
|
||||
VERSION=$(shell git describe --tags --long || echo "unknown version")
|
||||
BUILD_TIME=$(shell date -u)
|
||||
BUILD_TAGS='fakeDNS stats'
|
||||
BUILD_LDFLAGS='-s -w -X "github.com/xjasonlyu/tun2socks/constant.Version=$(VERSION)" -X "github.com/xjasonlyu/tun2socks/constant.BuildTime=$(BUILD_TIME)"'
|
||||
GOBUILD=go build -ldflags -X "github.com/xjasonlyu/tun2socks/constant.Version=$(VERSION)" \
|
||||
-X "github.com/xjasonlyu/tun2socks/constant.BuildTime=$(BUILD_TIME)" \
|
||||
-s -w
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
cd $(CMD_DIR) && go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) -o $(BUILD_DIR)/$(NAME)
|
||||
cd $(CMD_DIR) && $(GOBUILD) -v -tags $(BUILD_TAGS) -o $(BUILD_DIR)/$(NAME)
|
||||
|
||||
debug:
|
||||
cd $(CMD_DIR) && go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS) -race -o $(BUILD_DIR)/$(NAME)
|
||||
cd $(CMD_DIR) && $(GOBUILD) -v -tags $(BUILD_TAGS) -race -o $(BUILD_DIR)/$(NAME)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR)
|
||||
Reference in New Issue
Block a user