You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
508 B

5 years ago
NAME=tun2socks
5 years ago
BUILD_DIR=$(shell pwd)/build
CMD_DIR=$(shell pwd)/cmd
VERSION=$(shell git describe --tags --long || echo "unknown version")
5 years ago
BUILD_TIME=$(shell date -u)
BUILD_TAGS='fakedns session'
GOBUILD=go build -ldflags '-s -w -X "github.com/xjasonlyu/tun2socks/constant.Version=$(VERSION)"'
all: build
build:
5 years ago
cd $(CMD_DIR) && $(GOBUILD) -v -tags $(BUILD_TAGS) -o $(BUILD_DIR)/$(NAME)
5 years ago
debug:
5 years ago
cd $(CMD_DIR) && $(GOBUILD) -v -tags $(BUILD_TAGS) -race -o $(BUILD_DIR)/$(NAME)
clean:
5 years ago
rm -rf $(BUILD_DIR)