instalien: demo.exe
cp $< /alien/demo/$<
mkdir -p /alien/demo/sdr && cp sdr/* /alien/demo/sdr/
-
-.PHONY: run
-run: instalien
- rsh alien 'cd C:\Users\nuclear\Desktop\samba\demo && demo.exe'
+ for i in `tools/dlldepends | grep -v '++'`; do echo $$i; rsync $$i /alien/demo; done
.clang_complete: Makefile
rm -f $@
--- /dev/null
+#!/bin/sh
+
+rsh alien 'cd C:\Users\nuclear\Desktop\samba\demo && c:\msys32\usr\bin\gdbserver :1234 demo.exe' &
+
+echo 'target remote alien:1234' >.gdbinit-alien
+i686-w64-mingw32-gdb -x .gdbinit-alien demo.exe
--- /dev/null
+#!/bin/dash
+
+depends() {
+ dlls=$(strings $1 | grep '\.dll' | grep -v '\(USER32\|KERNEL32\|msvcrt\)')
+
+ gccver=$(i686-w64-mingw32-gcc -dumpversion | awk -F . '{ print $1 "." $2 }')
+
+ libpaths="/usr/i686-w64-mingw32/lib \
+ /usr/i686-w64-mingw32/bin \
+ /usr/lib/gcc/i686-w64-mingw32/$gccver-win32"
+
+ for i in $dlls; do
+ for path in $libpaths; do
+ dllfile=$path/$i
+ if [ -f $dllfile ]; then
+ echo $dllfile
+ if [ ! "$2" = noreq ]; then
+ depends $dllfile noreq
+ fi
+ fi
+ done
+ done
+}
+
+depends demo.exe | sort | uniq