summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6038948..81601bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
1IMAGE=docker.crute.me/ssh-proxy 1IMAGE=docker.crute.me/ssh-proxy
2BINARY=ssh-proxy 2BINARY=ssh-proxy
3CLIENT_BINARY=ssh-proxy-client
3 4
4$(BINARY): $(shell find . -name '*.go') 5$(BINARY): $(CLIENT_BINARY) $(shell find . -name '*.go')
5 @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 ) 6 @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 )
6 7
7 CGO_ENABLED=0 go build \ 8 CGO_ENABLED=0 go build \
@@ -9,6 +10,15 @@ $(BINARY): $(shell find . -name '*.go')
9 -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \ 10 -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \
10 -o $@ 11 -o $@
11 12
13$(CLIENT_BINARY): $(shell find . -name '*.go')
14 @[ "$(CLIENT_ID)" ] || ( echo "CLIENT_ID must be set"; exit 1 )
15
16 CGO_ENABLED=0 go build \
17 -tags clientonly \
18 -ldflags "-X main.appVersion=$(shell git describe --long --tags --dirty --always) \
19 -X code.crute.us/mcrute/ssh-proxy/cmd/client.clientId=$(CLIENT_ID)" \
20 -o $@
21
12.PHONY: vet 22.PHONY: vet
13vet: main.go 23vet: main.go
14 go vet $< 24 go vet $<