-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
31 lines (23 loc) · 846 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export GOPATH := $(shell pwd)
.PHONY: all clean test rpm install uninstall
all:
@go install -v org/gtunnel/gtunnel org/gtunnel/hack-echo \
org/gtunnel/hack-test-throughput org/gtunnel/hack-test-latency
clean:
@rm -rfv ./bin ./build ./pkg
test:
@go test org/gtunnel/gtunnel
rpm: all
make -f dist/Makefile rpm
install: all
install -D bin/gtunnel $(DESTDIR)/opt/gtunnel/gtunnel
install -D bin/gtunnel $(DESTDIR)/opt/gtunnel/hack-echo
install -D bin/gtunnel $(DESTDIR)/opt/gtunnel/hack-test-throughput
install -D bin/gtunnel $(DESTDIR)/opt/gtunnel/hack-test-latency
ln -s $(DESTDIR)/opt/gtunnel/gtunnel $(DESTDIR)/usr/bin/gtunnel
uninstall: all
rm -f $(DESTDIR)/opt/gtunnel/gtunnel
rm $(DESTDIR)/opt/gtunnel/hack-echo
rm $(DESTDIR)/opt/gtunnel/hack-test-throughput
rm $(DESTDIR)/opt/gtunnel/hack-test-latency
distclean: clean