diff options
Diffstat (limited to 'rbutil/ipodpatcher/Makefile')
-rw-r--r-- | rbutil/ipodpatcher/Makefile | 14 |
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 | |||
39 | CROSS=i586-mingw32msvc- | 39 | CROSS=i586-mingw32msvc- |
40 | endif | 40 | endif |
41 | endif | 41 | endif |
42 | ifeq ($(findstring Darwin,$(shell uname)),Darwin) | ||
43 | # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) | ||
44 | # might need adjustment for older Xcode. | ||
45 | NATIVECC ?= gcc-4.0 | ||
46 | CFLAGS+=-framework CoreFoundation -framework IOKit -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | ||
47 | endif | ||
42 | 48 | ||
43 | NATIVECC = gcc | 49 | NATIVECC ?= gcc |
44 | CC = $(CROSS)gcc | 50 | CC = $(CROSS)gcc |
45 | WINDRES = $(CROSS)windres | 51 | WINDRES = $(CROSS)windres |
46 | 52 | ||
@@ -49,7 +55,7 @@ SRC = main.c ipodpatcher.c fat32format.c arc4.c | |||
49 | all: $(OUTPUT) | 55 | all: $(OUTPUT) |
50 | 56 | ||
51 | ipodpatcher: $(SRC) ipodio-posix.c $(BOOTSRC) | 57 | ipodpatcher: $(SRC) ipodio-posix.c $(BOOTSRC) |
52 | gcc $(CFLAGS) -o ipodpatcher $(SRC) ipodio-posix.c $(BOOTSRC) | 58 | $(NATIVECC) $(CFLAGS) -o ipodpatcher $(SRC) ipodio-posix.c $(BOOTSRC) |
53 | strip ipodpatcher | 59 | strip ipodpatcher |
54 | 60 | ||
55 | ipodpatcher.exe: $(SRC) ipodio-win32.c ipodio-win32-scsi.c ipodpatcher-rc.o $(BOOTSRC) | 61 | ipodpatcher.exe: $(SRC) ipodio-win32.c ipodio-win32-scsi.c ipodpatcher-rc.o $(BOOTSRC) |
@@ -63,11 +69,11 @@ ipodpatcher-mac: ipodpatcher-i386 ipodpatcher-ppc | |||
63 | lipo -create ipodpatcher-ppc ipodpatcher-i386 -output ipodpatcher-mac | 69 | lipo -create ipodpatcher-ppc ipodpatcher-i386 -output ipodpatcher-mac |
64 | 70 | ||
65 | ipodpatcher-i386: $(SRC) ipodio-posix.c $(BOOTSRC) | 71 | ipodpatcher-i386: $(SRC) ipodio-posix.c $(BOOTSRC) |
66 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 $(CFLAGS) -o ipodpatcher-i386 $(SRC) ipodio-posix.c $(BOOTSRC) | 72 | $(NATIVECC) -arch i386 $(CFLAGS) -o ipodpatcher-i386 $(SRC) ipodio-posix.c $(BOOTSRC) |
67 | strip ipodpatcher-i386 | 73 | strip ipodpatcher-i386 |
68 | 74 | ||
69 | ipodpatcher-ppc: $(SRC) ipodio-posix.c $(BOOTSRC) | 75 | ipodpatcher-ppc: $(SRC) ipodio-posix.c $(BOOTSRC) |
70 | gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch ppc $(CFLAGS) -o ipodpatcher-ppc $(SRC) ipodio-posix.c $(BOOTSRC) | 76 | $(NATIVECC) -arch ppc $(CFLAGS) -o ipodpatcher-ppc $(SRC) ipodio-posix.c $(BOOTSRC) |
71 | strip ipodpatcher-ppc | 77 | strip ipodpatcher-ppc |
72 | 78 | ||
73 | ipod2c: ipod2c.c | 79 | ipod2c: ipod2c.c |