forked from whyengineer/dog-tunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (45 loc) · 1.18 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
all:
@make release
release:
make mac
make linux
make win
make pi
mac:
make client
make server
linux:
make client_linux
make server_linux
pi:
make client_pi
make server_pi
win:
make client_win
make server_win
debug:
make client_debug
make server_debug
client_debug:
@go build -gcflags "-N -l" -o dtunnel_d client.go
server_debug:
@go build -gcflags "-N -l" -o dtunnel_s_d server.go
client:
@go build -ldflags "-s -w" -o bin/dtunnel client.go
client_linux:
@GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/linux/dtunnel client.go
client_pi:
@GOOS=linux GOARCH=arm go build -ldflags "-s -w" -o bin/pi/dtunnel client.go
client_win:
@GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o bin/windows/dtunnel.exe client.go
server:
@go build -ldflags "-s -w" -o bin/dtunnel_s server.go
server_linux:
@GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/linux/dtunnel_s server.go
server_pi:
@GOOS=linux GOARCH=arm go build -ldflags "-s -w" -o bin/pi/dtunnel_s server.go
server_win:
@GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o bin/windows/dtunnel_s.exe server.go
clean:
@rm -rf bin/*
.PHONY: all debug release client_debug server_debug client server clean