mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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
This commit is contained in:
parent
72bd567494
commit
93f4bd351b
6 changed files with 183 additions and 13 deletions
|
|
@ -3,20 +3,17 @@ CFLAGS=-Wall -W
|
|||
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
|
||||
OUTPUT=beastpatcher.exe
|
||||
CROSS=
|
||||
CFLAGS+=-mno-cygwin
|
||||
else
|
||||
OUTPUT=beastpatcher
|
||||
CROSS=i586-mingw32msvc-
|
||||
endif
|
||||
|
||||
ifeq ($(OUTPUT),beastpatcher)
|
||||
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')
|
||||
else
|
||||
CFLAGS+=-mno-cygwin
|
||||
LIBS = ../MTP_DLL.dll
|
||||
endif
|
||||
WINLIBS = ../MTP_DLL.dll
|
||||
|
||||
NATIVECC = gcc
|
||||
CC = $(CROSS)gcc
|
||||
|
|
@ -27,8 +24,8 @@ beastpatcher: beastpatcher.c bootimg.c mtp_common.h mtp_libmtp.c
|
|||
gcc $(CFLAGS) -o beastpatcher beastpatcher.c bootimg.c mtp_libmtp.c $(LIBS)
|
||||
strip beastpatcher
|
||||
|
||||
beastpatcher.exe: beastpatcher.c bootimg.c mtp_common.h mtp_win32.c $(LIBS)
|
||||
$(CROSS)$(CC) $(CFLAGS) $(LIBS) -o beastpatcher.exe beastpatcher.c bootimg.c
|
||||
beastpatcher.exe: beastpatcher.c bootimg.c mtp_common.h mtp_win32.c $(WINLIBS)
|
||||
$(CC) $(CFLAGS) -o beastpatcher.exe beastpatcher.c bootimg.c mtp_win32.c $(WINLIBS)
|
||||
$(CROSS)strip beastpatcher.exe
|
||||
|
||||
beastpatcher-mac: beastpatcher-i386 beastpatcher-ppc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue