summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2021-09-22 12:10:44 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2021-09-22 12:45:07 +0300
commit8f869ec31d249732e22c609e8dff0a492a47af5a (patch)
treecafeebd0482cf79486ac46ec58463e3760ebd3a6 /Makefile
parentd9b9516ed6a372b1270011c2177681a9713c9d31 (diff)
make: add install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d11c945..9dee651 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ COMMIT = $(shell git describe --always --long --dirt)
TIME = $(shell date +'%Y-%m-%d/%H:%M:%S')
VERSION = $(COMMIT) at $(TIME)
LDFLAGS = -ldflags "-X 'main.BuildVersion=$(VERSION)'"
+prefix = /usr/local
build:
go build $(LDFLAGS) -v -o bin/ ./...
@@ -12,4 +13,8 @@ fmt:
test:
go test tunnel/pkg/test
+install:
+ install -D bin/tunnel $(prefix)/bin/tunnel
+ install -D bin/tunneld $(prefix)/bin/tunneld
+
.PHONY: build fmt test