Support building beastpatcher with MinGW.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20960 a1c6a512-1295-4272-9138-f99709370657
diff --git a/utils/MTP/beastpatcher/Makefile b/utils/MTP/beastpatcher/Makefile
index c0c82df..a40a233 100644
--- a/utils/MTP/beastpatcher/Makefile
+++ b/utils/MTP/beastpatcher/Makefile
@@ -5,14 +5,21 @@
CROSS=
CFLAGS+=-mno-cygwin
else
+ifeq ($(findstring MINGW,$(shell uname)),MINGW)
+OUTPUT=beastpatcher.exe
+CROSS=
+else
OUTPUT=beastpatcher
CROSS=i586-mingw32msvc-
endif
+endif
+ifneq ($(findstring MINGW,$(shell uname)),MINGW)
LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a
CFLAGS += $(shell printf \
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
+endif
WINLIBS = ../MTP_DLL.dll
NATIVECC = gcc