-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·32 lines (26 loc) · 899 Bytes
/
build.sh
File metadata and controls
executable file
·32 lines (26 loc) · 899 Bytes
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
#!/bin/bash
if [[ -d ./wired ]]; then
cd wired
fi
# make vector-gobot
cd vector-gobot
GCC="${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/prebuilt/bin/arm-oe-linux-gnueabi-clang" \
GPP="${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/prebuilt/bin/arm-oe-linux-gnueabi-clang++" \
make vector-gobot
cd ..
#make wired
# we don't need a docker container
CC="${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/prebuilt/bin/arm-oe-linux-gnueabi-clang -w" \
CXX="${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/prebuilt/bin/arm-oe-linux-gnueabi-clang++" \
CGO_LDFLAGS="-L$(pwd)/vector-gobot/build -Wl,-rpath-link,${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/sysroot/lib -Wl,-rpath-link,${HOME}/.anki/vicos-sdk/dist/4.0.0-r05/sysroot/usr/lib -latomic" \
CGO_CFLAGS="-I$(pwd)/vector-gobot/include" \
CGO_ENABLED=1 \
GOARCH=arm \
GOARM=7 \
GOOS=linux \
go build \
--trimpath \
-ldflags '-w -s' \
-buildvcs=false \
-o build/wired
upx build/wired