-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (19 loc) · 898 Bytes
/
Makefile
File metadata and controls
32 lines (19 loc) · 898 Bytes
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
folder = build
all: windows linux
certs:
mkdir -p certs
echo "[+] Make server cert"
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=US/ST=NRW/L=Earth/O=Company/OU=IT/CN=www.random.com/emailAddress=john@doe.com"
echo "[+] Make client cert"
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=US/ST=NRW/L=Earth/O=Company/OU=IT/CN=www.random.com/emailAddress=john@doe.com"
windows:
mkdir -p $(folder)
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $(folder)/netgo.exe ./cmd
linux:
mkdir -p $(folder)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $(folder)/netgo ./cmd
darwin:
mkdir -p $(folder)
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o $(folder)/netgo ./cmd
clean:
rm $(folder)/*