forked from n0tduck1e/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (21 loc) · 790 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
# Merlin version
VERSION=$(shell cat pkg/merlin.go |grep "const Version ="|cut -d"\"" -f2)
BUILD=$(shell git rev-parse HEAD)
# Output File Location
DIR=data/temp/v${VERSION}/${BUILD}
$(shell mkdir -p ${DIR})
# Go build flags
LDFLAGS=-ldflags '-X main.build=${BUILD} -buildid='
default:
go build ${LDFLAGS} -o ${DIR}/${MSERVER} main.go
# Compile Server - Windows x64
windows:
export GOOS=windows;export GOARCH=amd64;go build ${LDFLAGS} -o ${DIR}/merlinServer-Windows-x64.exe main.go
# Compile Server - Linux x64
linux:
export GOOS=linux;export GOARCH=amd64;go build ${LDFLAGS} -o ${DIR}/merlinServer-Linux-x64 main.go
# Compile Server - Darwin x64
darwin:
export GOOS=darwin;export GOARCH=amd64;go build ${LDFLAGS} -o ${DIR}/merlinServer-Darwin-x64 main.go
clean:
rm -rf ${DIR}*