summaryrefslogtreecommitdiff
path: root/utils/MTP/beastpatcher/Makefile
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-02-22 23:35:29 +0000
committerDave Chapman <dave@dchapman.com>2009-02-22 23:35:29 +0000
commit93f4bd351bcbd422d81592182aa1a2328f8d2d25 (patch)
tree8f19f7344e6e1cc6fba933e2f7aa91e6de3a4163 /utils/MTP/beastpatcher/Makefile
parent72bd567494c7c5744b1422d99fb8595ed0b1ae51 (diff)
downloadrockbox-93f4bd351bcbd422d81592182aa1a2328f8d2d25.tar.gz
rockbox-93f4bd351bcbd422d81592182aa1a2328f8d2d25.zip
Initial (untested) attempt at a Windows version. The MTP_DLL.dll library needs expanding to offer the same API as mtp_libmtp.c, but this needs someone with access to a MS compiler. Ideally we should also stop using a separate DLL and compile a single standalone beastpatcher.exe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20088 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/MTP/beastpatcher/Makefile')
-rw-r--r--utils/MTP/beastpatcher/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/utils/MTP/beastpatcher/Makefile b/utils/MTP/beastpatcher/Makefile
index edd08b1248..c0c82df53b 100644
--- a/utils/MTP/beastpatcher/Makefile
+++ b/utils/MTP/beastpatcher/Makefile
@@ -3,20 +3,17 @@ CFLAGS=-Wall -W
3ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) 3ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
4OUTPUT=beastpatcher.exe 4OUTPUT=beastpatcher.exe
5CROSS= 5CROSS=
6CFLAGS+=-mno-cygwin
6else 7else
7OUTPUT=beastpatcher 8OUTPUT=beastpatcher
8CROSS=i586-mingw32msvc- 9CROSS=i586-mingw32msvc-
9endif 10endif
10 11
11ifeq ($(OUTPUT),beastpatcher)
12LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a 12LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a
13CFLAGS += $(shell printf \ 13CFLAGS += $(shell printf \
14 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \ 14 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
15 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP') 15 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
16else 16WINLIBS = ../MTP_DLL.dll
17CFLAGS+=-mno-cygwin
18LIBS = ../MTP_DLL.dll
19endif
20 17
21NATIVECC = gcc 18NATIVECC = gcc
22CC = $(CROSS)gcc 19CC = $(CROSS)gcc
@@ -27,8 +24,8 @@ beastpatcher: beastpatcher.c bootimg.c mtp_common.h mtp_libmtp.c
27 gcc $(CFLAGS) -o beastpatcher beastpatcher.c bootimg.c mtp_libmtp.c $(LIBS) 24 gcc $(CFLAGS) -o beastpatcher beastpatcher.c bootimg.c mtp_libmtp.c $(LIBS)
28 strip beastpatcher 25 strip beastpatcher
29 26
30beastpatcher.exe: beastpatcher.c bootimg.c mtp_common.h mtp_win32.c $(LIBS) 27beastpatcher.exe: beastpatcher.c bootimg.c mtp_common.h mtp_win32.c $(WINLIBS)
31 $(CROSS)$(CC) $(CFLAGS) $(LIBS) -o beastpatcher.exe beastpatcher.c bootimg.c 28 $(CC) $(CFLAGS) -o beastpatcher.exe beastpatcher.c bootimg.c mtp_win32.c $(WINLIBS)
32 $(CROSS)strip beastpatcher.exe 29 $(CROSS)strip beastpatcher.exe
33 30
34beastpatcher-mac: beastpatcher-i386 beastpatcher-ppc 31beastpatcher-mac: beastpatcher-i386 beastpatcher-ppc