forked from emmaunel/DiscordGo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (28 loc) · 996 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
DIRECTORY=bin
MAC=macos-agent
LINUX=linux-agent
WIN=windows-agent.exe
RASP=rasp
BSD=bsd-agent
FLAGS=-ldflags "-s -w"
WIN-FLAGS=-ldflags -H=windowsgui
all: clean create-directory agent-mac agent-linux agent-windows agent-rasp agent-fuckbsd
create-directory:
mkdir ${DIRECTORY}
agent-mac:
echo "Compiling macos binary"
env GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o ${DIRECTORY}/${MAC} cmd/agent/main.go
agent-linux:
echo "Compiling Linux binary"
env GOOS=linux GOARCH=amd64 go build ${FLAGS} -o ${DIRECTORY}/${LINUX} cmd/agent/main.go
agent-windows:
echo "Compiling Windows binary"
env GOOS=windows GOARCH=amd64 go build ${WIN-FLAGS} -o ${DIRECTORY}/${WIN} cmd/agent/main.go
agent-rasp:
echo "Compiling RASPI binary"
env GOOS=linux GOARCH=arm GOARM=7 go build ${FLAGS} -o ${DIRECTORY}/${RASP} cmd/agent/main.go
agent-fuckbsd:
echo "Compiling FUCKBSD binary"
env GOOS=freebsd GOARCH=amd64 go build ${FLAGS} -o ${DIRECTORY}/${BSD} cmd/agent/main.go
clean:
rm -rf ${DIRECTORY}