This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dtunnel | ||
dtunnel_s | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,51 @@ | ||
|
||
all: | ||
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 dtunnel client.go | ||
@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 dtunnel_s server.go | ||
@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 dtunnel dtunnel_d dtunnel_s_d dtunnel_s | ||
@rm -rf bin/* | ||
.PHONY: all debug release client_debug server_debug client server clean |