summaryrefslogtreecommitdiff
path: root/utils/MTP/beastpatcher/Makefile
diff options
context:
space:
mode:
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