add Makefile

This commit is contained in:
octeep 2022-09-01 18:57:34 +08:00 committed by octeep
parent 41f2d96f04
commit 2d53f675af
3 changed files with 15 additions and 2 deletions

13
Makefile Normal file
View file

@ -0,0 +1,13 @@
export GO ?= go
.PHONY: all
all: wireproxy
.PHONY: wireproxy
wireproxy:
tag="$$(git describe --tag 2>/dev/null)" && \
${GO} build -ldflags "-X 'main.version=$$tag'" ./cmd/wireproxy
.PHONY: clean
clean:
${RM} wireproxy

View file

@ -52,7 +52,7 @@ Arguments:
```
git clone https://github.com/octeep/wireproxy
cd wireproxy
go build ./cmd/wireproxy
make
```
# Sample config file

View file

@ -14,7 +14,7 @@ import (
// an argument to denote that this process was spawned by -d
const daemonProcess = "daemon-process"
var version = "1.0.4-dev"
var version = "1.0.5-dev"
// attempts to pledge and panic if it fails
// this does nothing on non-OpenBSD systems