Skip to content

Commit aeb6410

Browse files
committed
Added mac in general build script
1 parent 5bd22b6 commit aeb6410

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

arch.mac.build.bash

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ USE_LOCAL_LIBUSB=yes ./openocd.build.bash
1515

1616
if [[ -f objdir/bin/openocd ]] ;
1717
then
18-
cd objdir/bin
19-
mv openocd openocd.bin
20-
echo "#!/bin/bash" >> openocd
21-
echo "DYLD_LIBRARY_PATH=\"\$(dirname \$0)/../lib\" \$0.bin \"\$1\" \"\$2\" \"\$3\" \"\$4\" \"\$5\" \"\$6\" \"\$7\" \"\$8\"" >> openocd
22-
chmod +x openocd
23-
cd -
18+
strip --strip-all objdir/bin/openocd
19+
mv objdir/bin/openocd objdir/bin/openocd.bin
20+
cp launchers/openocd.mac objdir/bin/openocd
21+
chmod +x objdir/bin/openocd
2422
fi
2523

24+
ARCH=`gcc -v 2>&1 | awk '/Target/ { print $2 }'`
25+
26+
rm -rf OpenOCD-0.9.0-dev-arduino
27+
rm -f OpenOCD-0.9.0-dev-arduino-$ARCH.tar.bz2
28+
mv objdir OpenOCD-0.9.0-dev-arduino
29+
tar cfvj OpenOCD-0.9.0-dev-arduino-$ARCH.tar.bz2 OpenOCD-0.9.0-dev-arduino
30+

arch.run-build.bash

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OS=`uname -o`
3+
OS=`uname -o || uname`
44

55
if [[ $OS == "GNU/Linux" ]] ;
66
then
@@ -24,6 +24,12 @@ then
2424
exit 0
2525
fi
2626

27+
if [[ $OS == "Darwin" ]] ;
28+
then
29+
./arch.mac.build.bash
30+
exit 0
31+
fi
32+
2733
echo OS Not supported: $OS
2834
exit 2
2935

0 commit comments

Comments
 (0)