-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
83 lines (61 loc) · 2.45 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# !!!MAKE SURE YOUR GOPATH ENVIRONMENT VARIABLE IS SET FIRST!!!
# Variables
DIR=builds
LUPO_SERVER=LUPO_SERVER
LUPO_CLIENT=LUPO_CLIENT
W=Windows-x64
L=Linux-x64
A=Linux-arm
M=Linux-mips
D=Darwin-x64
# Make Directory to store executables
$(shell mkdir -p ${DIR})
# Install go dependencies
$(shell go get ./lupo-server)
$(shell go get ./lupo-client)
$(shell go get ./sample)
# Change default to just make for the host OS and add MAKE ALL to do this
default: LUPO_SERVER-windows LUPO_SERVER-linux LUPO_SERVER-darwin LUPO_CLIENT-windows LUPO_CLIENT-linux LUPO_CLIENT-darwin
all: default
# Compile Windows binaries
windows: LUPO_SERVER-windows LUPO_CLIENT-windows
# Compile Linux binaries
linux: LUPO_SERVER-linux LUPO_CLIENT-linux
# Compile Darwin binaries
darwin: LUPO_SERVER-darwin LUPO_CLIENT-darwin
# Compile Arm binaries
arm: LUPO_SERVER-arm LUPO_CLIENT-arm
# Compile mips binaries
mips: LUPO_SERVER-mips LUPO_CLIENT-mips
# Compile LUPO_SERVER - Windows x64
LUPO_SERVER-windows:
export GOOS=windows GOARCH=amd64;go build -o ${DIR}/${LUPO_SERVER}-${W}.exe lupo-server/main.go
# Compile LUPO_SERVER - Linux x64
LUPO_SERVER-linux:
export GOOS=linux;export GOARCH=amd64;go build -o ${DIR}/${LUPO_SERVER}-${L} lupo-server/main.go
# Compile LUPO_SERVER - Darwin x64
LUPO_SERVER-darwin:
export GOOS=darwin;export GOARCH=amd64;go build -o ${DIR}/${LUPO_SERVER}-${D} lupo-server/main.go
# Compile LUPO_SERVER - Linux mips
LUPO_SERVER-mips:
export GOOS=linux;export GOARCH=mips;go build -o ${DIR}/${LUPO_SERVER}-${M} lupo-server/main.go
# Compile LUPO_SERVER - Linux arm
LUPO_SERVER-arm:
export GOOS=linux;export GOARCH=arm;export GOARM=7;go build -o ${DIR}/${LUPO_SERVER}-${A} lupo-server/main.go
# Compile LUPO_CLIENT - Windows x64
LUPO_CLIENT-windows:
export GOOS=windows GOARCH=amd64;go build -o ${DIR}/${LUPO_CLIENT}-${W}.exe lupo-client/main.go
# Compile LUPO_CLIENT - Linux x64
LUPO_CLIENT-linux:
export GOOS=linux;export GOARCH=amd64;go build -o ${DIR}/${LUPO_CLIENT}-${L} lupo-client/main.go
# Compile LUPO_CLIENT - Darwin x64
LUPO_CLIENT-darwin:
export GOOS=darwin;export GOARCH=amd64;go build -o ${DIR}/${LUPO_CLIENT}-${D} lupo-client/main.go
# Compile LUPO_CLIENT - Linux mips
LUPO_CLIENT-mips:
export GOOS=linux;export GOARCH=mips;go build -o ${DIR}/${LUPO_CLIENT}-${M} lupo-client/main.go
# Compile LUPO_CLIENT - Linux arm
LUPO_CLIENT-arm:
export GOOS=linux;export GOARCH=arm;export GOARM=7;go build -o ${DIR}/${LUPO_CLIENT}-${A} lupo-client/main.go
clean:
rm -rf ${DIR}*