-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
38 lines (24 loc) · 621 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
32
33
34
35
36
37
38
.PHONY: all
all:
if [ $$(uname) = "Linux" ] ; then make linux ; else make windows ; fi
.PHONY: linux
linux: sshdog
sshdog: *.go
echo "Building Linux target..."
go get
GOOS=linux GOARCH=amd64 go build -o sshdog
.PHONY: windows
windows: sshdog.exe
sshdog.exe: *.go
echo "Building Windows target..."
go get
GOOS=windows GOARCH=amd64 go build -o sshdog.exe
.PHONY: upx
upx:
if [ $$(uname) = "Linux" ] ; then upx -9 sshdog ; else upx -9 sshdog.exe ; fi
.PHONY: run
run:
if [ $$(uname) = "Linux" ] ; then ./sshdog ; else ./sshdog.exe ; fi
.PHONY: clean
clean:
rm -f *.bak sshdog sshdog.exe 2> /dev/null