summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher/Makefile
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-01-30 17:02:37 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-01-30 17:02:37 +0000
commitc8d13b6a7dc76e80663ca71338fed4020e2be132 (patch)
tree01136e99b5b874322f8af6838d2f704dfc4a40e8 /rbutil/ipodpatcher/Makefile
parent25236232c00ed3ead85a6918fa501ba76b4a892a (diff)
downloadrockbox-c8d13b6a7dc76e80663ca71338fed4020e2be132.tar.gz
rockbox-c8d13b6a7dc76e80663ca71338fed4020e2be132.tar.bz2
rockbox-c8d13b6a7dc76e80663ca71338fed4020e2be132.zip
Implement ipod_scsi_inquiry() on OS X.
This implements the basic functionality for sending inquiries on OS X. The current implementation has some limitations: - it will not respect the selected device but pick the first Ipod found. - it is inefficient due to the way ipodpatcher expects this which doesn't really match how it works on OS X. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24382 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/Makefile')
-rw-r--r--rbutil/ipodpatcher/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/rbutil/ipodpatcher/Makefile b/rbutil/ipodpatcher/Makefile
index 34b4dd6b43..7c203a94aa 100644
--- a/rbutil/ipodpatcher/Makefile
+++ b/rbutil/ipodpatcher/Makefile
@@ -39,8 +39,14 @@ OUTPUT=ipodpatcher
CROSS=i586-mingw32msvc-
endif
endif
+ifeq ($(findstring Darwin,$(shell uname)),Darwin)
+# building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode)
+# might need adjustment for older Xcode.
+NATIVECC ?= gcc-4.0
+CFLAGS+=-framework CoreFoundation -framework IOKit -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
+endif
-NATIVECC = gcc
+NATIVECC ?= gcc
CC = $(CROSS)gcc
WINDRES = $(CROSS)windres
@@ -49,7 +55,7 @@ SRC = main.c ipodpatcher.c fat32format.c arc4.c
all: $(OUTPUT)
ipodpatcher: $(SRC) ipodio-posix.c $(BOOTSRC)
- gcc $(CFLAGS) -o ipodpatcher $(SRC) ipodio-posix.c $(BOOTSRC)
+ $(NATIVECC) $(CFLAGS) -o ipodpatcher $(SRC) ipodio-posix.c $(BOOTSRC)
strip ipodpatcher
ipodpatcher.exe: $(SRC) ipodio-win32.c ipodio-win32-scsi.c ipodpatcher-rc.o $(BOOTSRC)
@@ -63,11 +69,11 @@ ipodpatcher-mac: ipodpatcher-i386 ipodpatcher-ppc
lipo -create ipodpatcher-ppc ipodpatcher-i386 -output ipodpatcher-mac
ipodpatcher-i386: $(SRC) ipodio-posix.c $(BOOTSRC)
- gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 $(CFLAGS) -o ipodpatcher-i386 $(SRC) ipodio-posix.c $(BOOTSRC)
+ $(NATIVECC) -arch i386 $(CFLAGS) -o ipodpatcher-i386 $(SRC) ipodio-posix.c $(BOOTSRC)
strip ipodpatcher-i386
ipodpatcher-ppc: $(SRC) ipodio-posix.c $(BOOTSRC)
- gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc $(CFLAGS) -o ipodpatcher-ppc $(SRC) ipodio-posix.c $(BOOTSRC)
+ $(NATIVECC) -arch ppc $(CFLAGS) -o ipodpatcher-ppc $(SRC) ipodio-posix.c $(BOOTSRC)
strip ipodpatcher-ppc
ipod2c: ipod2c.c