-
Notifications
You must be signed in to change notification settings - Fork 7
/
mkdist.sh
42 lines (33 loc) · 844 Bytes
/
mkdist.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
set -e
p=$1
if test "x$p" = x; then
p=../..
src=$p/openocd
builddir=$src
else
# make $p absolute
wd=`pwd`
cd $p
p=`pwd`
cd $wd
cp -a $p/windows/dist .
src=$p/openocd
builddir=..
fi
cd dist
toolchain=x86_64-w64-mingw32
cp -a $src/LICENSES .
cp $src/COPYING .
mkdir -p bin
cp $builddir/src/openocd.exe bin/openocd-efm32s2.exe
$toolchain-strip -s bin/openocd-efm32s2.exe
mkdir -p scripts/interface
cp $src/tcl/interface/cmsis-dap.cfg scripts/interface
cp $p/dist/scripts/interface/ftdi_ft232h.cfg scripts/interface
cp $src/tcl/interface/jlink.cfg scripts/interface
mkdir -p scripts/target
cp $src/tcl/target/efm32s2.cfg scripts/target
cp $src/tcl/target/efm32s2_g23.cfg scripts/target
cp $src/tcl/target/swj-dp.tcl scripts/target
cp $p/windows/hidapi-libusb/x64/hidapi.dll bin/
cp $p/windows/libusb-1.0/COPYING COPYING.libusb