3 BOOT_H
= ipod1g2g.h ipod3g.h ipod4g.h ipodcolor.h ipodmini.h ipodmini2g.h ipodnano.h ipodvideo.h
5 # Uncomment the next two lines to build with embedded bootloaders and the
6 # --install option and interactive mode. You need the full set of Rockbox
7 # bootloaders in this directory - download them from
8 # http://download.rockbox.org/bootloader/ipod/bootloaders.zip
10 #BOOTSRC = ipod1g2g.c ipod3g.c ipod4g.c ipodcolor.c ipodmini.c ipodmini2g.c ipodnano.c ipodvideo.c
11 #CFLAGS += -DWITH_BOOTOBJS
13 ifeq ($(findstring CYGWIN
,$(shell uname
)),CYGWIN
)
14 OUTPUT
=ipodpatcher.exe
18 ifeq ($(findstring MINGW
,$(shell uname
)),MINGW
)
19 OUTPUT
=ipodpatcher.exe
23 CROSS
=i586-mingw32msvc-
29 WINDRES
= $(CROSS
)windres
31 SRC
= main.c ipodpatcher.c fat32format.c parttypes.h arc4.c
35 ipodpatcher
: $(SRC
) ipodio-posix.c
$(BOOTSRC
)
36 gcc
$(CFLAGS
) -o ipodpatcher
$(SRC
) ipodio-posix.c
$(BOOTSRC
)
39 ipodpatcher.exe
: $(SRC
) ipodio-win32.c ipodpatcher-rc.o
$(BOOTSRC
)
40 $(CC
) $(CFLAGS
) -o ipodpatcher.exe
$(SRC
) ipodio-win32.c ipodpatcher-rc.o
$(BOOTSRC
)
41 $(CROSS
)strip ipodpatcher.exe
43 ipodpatcher-rc.o
: ipodpatcher.rc ipodpatcher.manifest
44 $(WINDRES
) -i ipodpatcher.rc
-o ipodpatcher-rc.o
46 ipodpatcher-mac
: ipodpatcher-i386 ipodpatcher-ppc
47 lipo
-create ipodpatcher-ppc ipodpatcher-i386
-output ipodpatcher-mac
49 ipodpatcher-i386
: $(SRC
) ipodio-posix.c
$(BOOTSRC
)
50 gcc
-isysroot
/Developer
/SDKs
/MacOSX10.4u.sdk
-mmacosx-version-min
=10.4 -arch i386
$(CFLAGS
) -o ipodpatcher-i386
$(SRC
) ipodio-posix.c
$(BOOTSRC
)
51 strip ipodpatcher-i386
53 ipodpatcher-ppc
: $(SRC
) ipodio-posix.c
$(BOOTSRC
)
54 gcc
-isysroot
/Developer
/SDKs
/MacOSX10.4u.sdk
-mmacosx-version-min
=10.4 -arch ppc
$(CFLAGS
) -o ipodpatcher-ppc
$(SRC
) ipodio-posix.c
$(BOOTSRC
)
58 $(NATIVECC
) $(CFLAGS
) -o ipod2c ipod2c.c
60 ipod1g2g.c
: bootloader-ipod1g2g.ipod ipod2c
61 .
/ipod2c bootloader-ipod1g2g.ipod ipod1g2g
63 ipod3g.c
: bootloader-ipod3g.ipod ipod2c
64 .
/ipod2c bootloader-ipod3g.ipod ipod3g
66 ipod4g.c
: bootloader-ipod4g.ipod ipod2c
67 .
/ipod2c bootloader-ipod4g.ipod ipod4g
69 ipodcolor.c
: bootloader-ipodcolor.ipod ipod2c
70 .
/ipod2c bootloader-ipodcolor.ipod ipodcolor
72 ipodmini.c
: bootloader-ipodmini.ipod ipod2c
73 .
/ipod2c bootloader-ipodmini.ipod ipodmini
75 ipodmini2g.c
: bootloader-ipodmini2g.ipod ipod2c
76 .
/ipod2c bootloader-ipodmini2g.ipod ipodmini2g
78 ipodnano.c
: bootloader-ipodnano.ipod ipod2c
79 .
/ipod2c bootloader-ipodnano.ipod ipodnano
81 ipodvideo.c
: bootloader-ipodvideo.ipod ipod2c
82 .
/ipod2c bootloader-ipodvideo.ipod ipodvideo
86 rm -f ipodpatcher.exe ipodpatcher-rc.o ipodpatcher-mac ipodpatcher-i386 ipodpatcher-ppc ipodpatcher ipod2c
*~
$(BOOTSRC
) $(BOOT_H
)