-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
executable file
·60 lines (44 loc) · 1.66 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
BIN_DIR = ./bin/
BINARY_NAME=seacrane
ARMBIN = ${BINARY_NAME}-arm
MIPSBIN = ${BINARY_NAME}-mips
MIPSBINSF = ${BINARY_NAME}-mips-sf
MIPSBINLE = ${BINARY_NAME}-mips-le
WINDOWS = ${BINARY_NAME}.exe
ANDROID = ${BINARY_NAME}-android
OSX = ${BINARY_NAME}-osx
OSXARM = ${BINARY_NAME}-osxarm
WASM = ${BINARY_NAME}-wasm
x86:
go build -o ${BIN_DIR}${BINARY_NAME} ${BINARY_NAME}
arm:
env GOARCH=arm GOOS=linux go build -o ${BIN_DIR}${ARMBIN} main.go
mips:
env GOARCH=mips GOOS=linux go build -o ${BIN_DIR}${MIPSBIN} main.go
mipssf:
env GOARCH=mips GOMIPS=softfloat GOOS=linux go build -o ${BIN_DIR}${MIPSBINSF} main.go
mipsle:
env GOARCH=mipsle GOOS=linux go build -o ${BIN_DIR}${MIPSBINLE} main.go
windows:
env GOARCH=amd64 GOOS=windows go build -o ${BIN_DIR}${WINDOWS} main.go
osx:
env GOHOSTOS=linux GOOS=darwin go build -o ${BIN_DIR}${OSX} main.go
wasm:
env GOHOSTOS=linux GOOS=js GOARCH=wasm go build -o ${BIN_DIR}${WASM} main.go
arm-osx:
GOHOSTOS=linux GOARCH=arm64 GOOS=darwin go build -o ${BIN_DIR}${OSXARM} main.go
# golang 1.18 will atleast be needed for this. darwin arm support came in this release
android:
env GOHOSTOS=linux GOARCH=arm64 GOOS=android go build -o ${BIN_DIR}${ANDROID} main.go
# requires gomobile
# all: x86 arm windows osx arm-osx mips mipssf mipsle android
all: all-32bit all-non32bit
all-32bit: arm mips mipssf mipsle
all-non32bit: x86 windows osx arm-osx android
run:
go run ${BINARY_NAME}
clean:
echo "all clean lol"
clean-all:
rm ${BIN_DIR}${BINARY_NAME} ${BIN_DIR}${ARMBIN} ${BIN_DIR}${WINDOWS} ${BIN_DIR}${OSX} ${BIN_DIR}${OSX-ARM} ${BIN_DIR}${MIPSBIN} ${BIN_DIR}${MIPSBINLE} ${BIN_DIR}${MIPSBINSF} ${BIN_DIR}${ANDROID}
file ${BIN_DIR}seacrane*