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.

16 lines
449 B

5 years ago
NAME=tun2socks
5 years ago
BINDIR=$(shell pwd)/bin
VERSION=$(shell git describe --tags --long || echo "unknown version")
5 years ago
BUILDTAGS='fakedns session'
4 years ago
GOBUILD=go build -trimpath -ldflags '-s -w -extldflags "-static" -X "github.com/xjasonlyu/tun2socks/constant.Version=$(VERSION)"'
all: build
build:
4 years ago
cd component/session && packr2
cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -o $(BINDIR)/$(NAME)
4 years ago
cd component/session && packr2 clean
clean:
5 years ago
rm -rf $(BINDIR)