mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
16 lines
449 B
Makefile
16 lines
449 B
Makefile
NAME=tun2socks
|
|
BINDIR=$(shell pwd)/bin
|
|
VERSION=$(shell git describe --tags --long || echo "unknown version")
|
|
BUILDTAGS='fakedns session'
|
|
GOBUILD=go build -trimpath -ldflags '-s -w -extldflags "-static" -X "github.com/xjasonlyu/tun2socks/constant.Version=$(VERSION)"'
|
|
|
|
all: build
|
|
|
|
build:
|
|
cd component/session && packr2
|
|
cd cmd && $(GOBUILD) -v -tags $(BUILDTAGS) -o $(BINDIR)/$(NAME)
|
|
cd component/session && packr2 clean
|
|
|
|
clean:
|
|
rm -rf $(BINDIR)
|