From 8f869ec31d249732e22c609e8dff0a492a47af5a Mon Sep 17 00:00:00 2001 From: Mikhail Osipov Date: Wed, 22 Sep 2021 12:10:44 +0300 Subject: make: add install --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2