forked from iegomez/mosquitto-go-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·47 lines (40 loc) · 866 Bytes
/
build.sh
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
#!/bin/bash
apt-get update
apt-get install -y gcc-multilib
cd /usr/src/mosquitto-$MOSQUITTO_VERSION/include
cp *.h /usr/include
cd /usr/src/mosquitto-go-auth
#build amd64 Linux
make
cp go-auth.so pw /usr/src/output/linux-amd64
# build arm64 Linux
make clean
export CGO_ENABLED=1
export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc
make
cp go-auth.so pw /usr/src/output/linux-arm64
# build armv7 Linux
make clean
export CGO_ENABLED=1
export GOARCH=arm
export GOARM=7
export CC=arm-linux-gnueabi-gcc
make
cp go-auth.so pw /usr/src/output/linux-armv7
# build armv7 Linux
make clean
export CGO_ENABLED=1
export GOARCH=arm
export GOARM=6
export CC=arm-linux-gnueabi-gcc
make
cp go-auth.so pw /usr/src/output/linux-armv6
# build x86 Linux
make clean
export CGO_ENABLED=1
export GOARCH=386
export GOARM=
export CC=gcc
make
cp go-auth.so pw /usr/src/output/linux-x86