Files
tun2socks/Makefile
T
2019-08-13 17:21:55 +08:00

18 lines
444 B
Makefile

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