20 lines
547 B
Bash
20 lines
547 B
Bash
|
|
#!/bin/bash
|
||
|
|
# Build the IOTC bridge program for ARM32 (runs under qemu-arm-static)
|
||
|
|
cd "$(dirname "$0")/.."
|
||
|
|
|
||
|
|
SODIR="$(pwd)/lib"
|
||
|
|
|
||
|
|
echo "Compiling IOTC bridge (dynamic, hard-float)..."
|
||
|
|
arm-linux-gnueabihf-gcc -o iotc/iotc_bridge iotc/iotc_bridge.c -L"$SODIR" -lIOTCAPIs_ALL -lpthread -Wl,-rpath,"$SODIR"
|
||
|
|
|
||
|
|
if [ $? -eq 0 ]; then
|
||
|
|
echo "Success: $(file iotc/iotc_bridge)"
|
||
|
|
echo ""
|
||
|
|
echo "Test with:"
|
||
|
|
echo " qemu-arm-static -L /usr/arm-linux-gnueabi iotc/iotc_bridge"
|
||
|
|
echo " Then type: init"
|
||
|
|
else
|
||
|
|
echo "Build failed"
|
||
|
|
exit 1
|
||
|
|
fi
|