Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 1 | # __________ __ ___. |
| 2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 6 | # \/ \/ \/ \/ \/ |
| 7 | # $Id$ |
| 8 | # |
Jens Arnold | 7170a00 | 2007-02-05 00:50:49 +0000 | [diff] [blame] | 9 | |
Rafaël Carré | db3afb0 | 2012-02-05 14:03:10 -0500 | [diff] [blame] | 10 | CFLAGS += -Wall -W |
Dave Chapman | bdc27ff | 2007-02-08 18:05:50 +0000 | [diff] [blame] | 11 | |
Dave Chapman | 4cb879d | 2010-01-28 09:20:32 +0000 | [diff] [blame] | 12 | # Build with "make BOOTOBJS=1" to build with embedded bootloaders and the |
Dave Chapman | bdc27ff | 2007-02-08 18:05:50 +0000 | [diff] [blame] | 13 | # --install option and interactive mode. You need the full set of Rockbox |
| 14 | # bootloaders in this directory - download them from |
| 15 | # http://download.rockbox.org/bootloader/ipod/bootloaders.zip |
| 16 | |
Dave Chapman | 4cb879d | 2010-01-28 09:20:32 +0000 | [diff] [blame] | 17 | # Releases of ipodpatcher are created with "make RELEASE=1". This |
| 18 | # enables BOOTOBJS and uses the VERSION string defined in main.c |
Dave Chapman | 8e95cc4 | 2009-10-13 08:02:59 +0000 | [diff] [blame] | 19 | ifdef RELEASE |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 20 | CFLAGS += -DRELEASE |
Dave Chapman | 8e95cc4 | 2009-10-13 08:02:59 +0000 | [diff] [blame] | 21 | BOOTOBJS=1 |
| 22 | endif |
| 23 | |
| 24 | ifdef BOOTOBJS |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 25 | BOOTSRC = ipod1g2g.c ipod3g.c ipod4g.c ipodcolor.c ipodmini1g.c \ |
| 26 | ipodmini2g.c ipodnano1g.c ipodvideo.c ipodnano2g.c |
Dave Chapman | 8e95cc4 | 2009-10-13 08:02:59 +0000 | [diff] [blame] | 27 | CFLAGS += -DWITH_BOOTOBJS |
| 28 | endif |
| 29 | |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 30 | # additional frameworks to link on on OS X |
Dominik Riebeling | 703bc40 | 2013-04-05 20:03:45 +0200 | [diff] [blame] | 31 | LDOPTS_OSX = -framework CoreFoundation -framework IOKit |
Jens Arnold | 7170a00 | 2007-02-05 00:50:49 +0000 | [diff] [blame] | 32 | |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 33 | LIBSOURCES = ipodpatcher.c fat32format.c arc4.c \ |
| 34 | ipodio-posix.c ipodio-win32-scsi.c ipodio-win32.c |
Dominik Riebeling | 6f4beaa | 2016-12-16 19:39:07 +0100 | [diff] [blame] | 35 | SOURCES = main.c $(BOOTSRC) |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 36 | ipodpatcher: SOURCES+= ipodio-posix.c |
Dave Chapman | bdc27ff | 2007-02-08 18:05:50 +0000 | [diff] [blame] | 37 | |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 38 | OUTPUT = ipodpatcher |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 39 | include ../libtools.make |
Dave Chapman | 45895df | 2006-12-13 08:57:06 +0000 | [diff] [blame] | 40 | |
Dominik Riebeling | b3ef8c8 | 2013-04-01 21:30:26 +0200 | [diff] [blame] | 41 | ipodpatcher.exe: $(OBJDIR)ipodpatcher-rc.o |
Dominik Riebeling | b056e02 | 2011-12-16 18:35:01 +0000 | [diff] [blame] | 42 | $(OBJDIR)ipodpatcher-rc.o: ipodpatcher.rc ipodpatcher.manifest |
Dominik Riebeling | b3ef8c8 | 2013-04-01 21:30:26 +0200 | [diff] [blame] | 43 | @echo WINDRES $(notdir $<) |
| 44 | $(SILENT)$(CROSS)$(WINDRES) -i $< -o $@ |
Dave Chapman | 1602bf5 | 2007-03-03 10:57:32 +0000 | [diff] [blame] | 45 | |
Dominik Riebeling | 8a3824f | 2012-04-28 12:06:55 +0200 | [diff] [blame] | 46 | %.c: bootloader-%.ipod $(BIN2C) |
| 47 | @echo BIN2C $< |
| 48 | $(SILENT)$(BIN2C) -i $< $* |
Dave Chapman | bdc27ff | 2007-02-08 18:05:50 +0000 | [diff] [blame] | 49 | |
Dominik Riebeling | 8a3824f | 2012-04-28 12:06:55 +0200 | [diff] [blame] | 50 | %.c: bootloader-%.ipodx $(BIN2C) |
| 51 | @echo BIN2C $< |
| 52 | $(SILENT)$(BIN2C) -i $< $* |
Dave Chapman | bdc27ff | 2007-02-08 18:05:50 +0000 | [diff] [blame] | 53 | |