2010-05-28 22:52:53 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-06-11 19:25:29 -04:00
|
|
|
# This hack copies libmaple's source, linker scripts, and support
|
|
|
|
# libraries into the Maple IDE repository (which is expected as its
|
|
|
|
# first argument).
|
2010-05-28 22:52:53 -04:00
|
|
|
|
2010-12-15 19:17:55 -05:00
|
|
|
DEST=$1
|
2010-05-28 22:52:53 -04:00
|
|
|
|
2010-12-15 19:17:55 -05:00
|
|
|
DEST_CORES=$DEST/hardware/leaflabs/cores/maple
|
2011-01-11 18:16:05 -05:00
|
|
|
DEST_LIBS=$DEST/libraries
|
2010-12-15 19:17:55 -05:00
|
|
|
|
|
|
|
LMAPLE_SRC="LICENSE
|
2010-05-28 22:52:53 -04:00
|
|
|
./libmaple/*.h
|
|
|
|
./libmaple/*.c
|
2010-12-15 19:17:55 -05:00
|
|
|
./libmaple/*.S
|
2010-05-28 22:52:53 -04:00
|
|
|
./libmaple/usb/*.h
|
|
|
|
./libmaple/usb/*.c
|
|
|
|
./libmaple/usb/usb_lib/*.h
|
|
|
|
./libmaple/usb/usb_lib/*.c
|
|
|
|
./wirish/*.h
|
|
|
|
./wirish/main.cxx
|
|
|
|
./wirish/*.cpp
|
|
|
|
./wirish/comm/*.cpp
|
2010-05-31 19:02:00 -04:00
|
|
|
./wirish/comm/*.h
|
2011-03-30 08:06:42 -04:00
|
|
|
./wirish/boards/*.h
|
|
|
|
./wirish/boards/*.cpp
|
2011-09-13 05:56:29 -04:00
|
|
|
./support/ld/common.inc
|
2010-12-15 01:50:56 -05:00
|
|
|
./support/ld/maple
|
2011-03-16 17:37:21 -04:00
|
|
|
./support/ld/maple_mini
|
2010-12-15 01:50:56 -05:00
|
|
|
./support/ld/maple_native
|
2011-03-16 17:37:21 -04:00
|
|
|
./support/ld/maple_RET6
|
2010-05-31 19:02:00 -04:00
|
|
|
./support/ld/names.inc"
|
|
|
|
|
2010-05-28 22:52:53 -04:00
|
|
|
echo "First make sure DEST exists: $DEST"
|
2010-06-03 11:52:53 -04:00
|
|
|
if !(test -d $DEST)
|
2010-05-28 22:52:53 -04:00
|
|
|
then
|
2010-06-03 11:52:53 -04:00
|
|
|
echo "Nope! Make sure you're doing this right?"
|
|
|
|
exit -1
|
2010-05-28 22:52:53 -04:00
|
|
|
fi
|
|
|
|
|
2010-12-15 19:17:55 -05:00
|
|
|
# source
|
2011-01-11 18:16:05 -05:00
|
|
|
echo Copying libmaple source
|
2011-03-16 17:37:21 -04:00
|
|
|
rm -rf $DEST_CORES/*.c $DEST_CORES/*.cpp $DEST_CORES/*.h $DEST_CORES/*.cxx $DEST_CORES/*.S
|
|
|
|
rm -rf $DEST_CORES/*.inc $DEST_CORES/*.a $DEST_CORES/maple $DEST_CORES/maple_*
|
2010-12-15 19:17:55 -05:00
|
|
|
cp -R $LMAPLE_SRC $DEST_CORES
|
|
|
|
|
2011-01-11 18:16:05 -05:00
|
|
|
echo Copying over libraries
|
|
|
|
cp -R libraries/* $DEST_LIBS
|
|
|
|
|
2011-03-30 08:06:42 -04:00
|
|
|
# libmaple version
|
|
|
|
echo Creating libmaple-version.txt
|
|
|
|
git show-ref HEAD | cut -c 1-10 > $DEST/libmaple-version.txt
|
|
|
|
|
2011-01-11 18:16:05 -05:00
|
|
|
echo Done.
|