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
462 B

5 years ago
NAME=tun2socks
BUILDDIR=$(shell pwd)/build
CMDDIR=$(shell pwd)/cmd/tun2socks
VERSION=$(shell git describe --tags --long || echo "unknown version")
5 years ago
BUILD_TAGS='socks fakedns d stats'
BUILD_LDFLAGS='-s -w -X "main.version=$(VERSION)"'
5 years ago
GOBUILD=go build -ldflags $(BUILD_LDFLAGS) -v -tags $(BUILD_TAGS)
all: build
build:
5 years ago
cd $(CMDDIR) && $(GOBUILD) -o $(BUILDDIR)/$(NAME)
5 years ago
debug:
cd $(CMDDIR) && $(GOBUILD) -race -o $(BUILDDIR)/$(NAME)
clean:
5 years ago
rm -rf $(BUILDDIR)