diff options
Diffstat (limited to 'utils/MTP/beastpatcher/Makefile')
-rw-r--r-- | utils/MTP/beastpatcher/Makefile | 11 |
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 | |||
3 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) | 3 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) |
4 | OUTPUT=beastpatcher.exe | 4 | OUTPUT=beastpatcher.exe |
5 | CROSS= | 5 | CROSS= |
6 | CFLAGS+=-mno-cygwin | ||
6 | else | 7 | else |
7 | OUTPUT=beastpatcher | 8 | OUTPUT=beastpatcher |
8 | CROSS=i586-mingw32msvc- | 9 | CROSS=i586-mingw32msvc- |
9 | endif | 10 | endif |
10 | 11 | ||
11 | ifeq ($(OUTPUT),beastpatcher) | ||
12 | LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a | 12 | LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a |
13 | CFLAGS += $(shell printf \ | 13 | CFLAGS += $(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') |
16 | else | 16 | WINLIBS = ../MTP_DLL.dll |
17 | CFLAGS+=-mno-cygwin | ||
18 | LIBS = ../MTP_DLL.dll | ||
19 | endif | ||
20 | 17 | ||
21 | NATIVECC = gcc | 18 | NATIVECC = gcc |
22 | CC = $(CROSS)gcc | 19 | CC = $(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 | ||
30 | beastpatcher.exe: beastpatcher.c bootimg.c mtp_common.h mtp_win32.c $(LIBS) | 27 | beastpatcher.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 | ||
34 | beastpatcher-mac: beastpatcher-i386 beastpatcher-ppc | 31 | beastpatcher-mac: beastpatcher-i386 beastpatcher-ppc |