2011-12-16 18:35:01 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
|
|
|
# $Id$
|
|
|
|
#
|
2007-02-05 00:50:49 +00:00
|
|
|
|
2012-02-05 19:03:10 +00:00
|
|
|
CFLAGS += -Wall -W
|
2007-02-08 18:05:50 +00:00
|
|
|
|
2010-01-28 09:20:32 +00:00
|
|
|
# Build with "make BOOTOBJS=1" to build with embedded bootloaders and the
|
2007-02-08 18:05:50 +00:00
|
|
|
# --install option and interactive mode. You need the full set of Rockbox
|
|
|
|
# bootloaders in this directory - download them from
|
|
|
|
# http://download.rockbox.org/bootloader/ipod/bootloaders.zip
|
|
|
|
|
2010-01-28 09:20:32 +00:00
|
|
|
# Releases of ipodpatcher are created with "make RELEASE=1". This
|
|
|
|
# enables BOOTOBJS and uses the VERSION string defined in main.c
|
2009-10-13 08:02:59 +00:00
|
|
|
ifdef RELEASE
|
2011-12-16 18:35:01 +00:00
|
|
|
CFLAGS += -DRELEASE
|
2009-10-13 08:02:59 +00:00
|
|
|
BOOTOBJS=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef BOOTOBJS
|
2011-12-16 18:35:01 +00:00
|
|
|
BOOTSRC = ipod1g2g.c ipod3g.c ipod4g.c ipodcolor.c ipodmini1g.c \
|
|
|
|
ipodmini2g.c ipodnano1g.c ipodvideo.c ipodnano2g.c
|
2009-10-13 08:02:59 +00:00
|
|
|
CFLAGS += -DWITH_BOOTOBJS
|
|
|
|
endif
|
|
|
|
|
2010-01-30 17:02:37 +00:00
|
|
|
ifeq ($(findstring Darwin,$(shell uname)),Darwin)
|
2011-12-16 18:35:01 +00:00
|
|
|
# additional frameworks to link on on OS X
|
2011-12-16 20:25:56 +00:00
|
|
|
LDOPTS += -framework CoreFoundation -framework IOKit
|
2010-01-30 17:02:37 +00:00
|
|
|
endif
|
2007-02-05 00:50:49 +00:00
|
|
|
|
2011-12-16 18:35:01 +00:00
|
|
|
LIBSOURCES = ipodpatcher.c fat32format.c arc4.c \
|
|
|
|
ipodio-posix.c ipodio-win32-scsi.c ipodio-win32.c
|
|
|
|
SOURCES = main.c $(BOOTSRC) $(LIBSOURCES)
|
|
|
|
ipodpatcher: SOURCES+= ipodio-posix.c
|
|
|
|
ipodpatcher.exe: SOURCES+= ipodpatcher-rc.o
|
2007-06-16 22:32:57 +00:00
|
|
|
|
2011-12-16 18:35:01 +00:00
|
|
|
OUTPUT = ipodpatcher
|
2007-02-05 00:50:49 +00:00
|
|
|
all: $(OUTPUT)
|
2011-12-16 18:35:01 +00:00
|
|
|
include ../libtools.make
|
2006-12-13 08:57:06 +00:00
|
|
|
|
2011-12-16 18:35:01 +00:00
|
|
|
$(OBJDIR)ipodpatcher-rc.o: ipodpatcher.rc ipodpatcher.manifest
|
|
|
|
$(CROSS)$(WINDRES) -i ipodpatcher.rc -o ipodpatcher-rc.o
|
2007-03-03 10:57:32 +00:00
|
|
|
|
2012-04-28 10:06:55 +00:00
|
|
|
%.c: bootloader-%.ipod $(BIN2C)
|
|
|
|
@echo BIN2C $<
|
|
|
|
$(SILENT)$(BIN2C) -i $< $*
|
2007-02-08 18:05:50 +00:00
|
|
|
|
2012-04-28 10:06:55 +00:00
|
|
|
%.c: bootloader-%.ipodx $(BIN2C)
|
|
|
|
@echo BIN2C $<
|
|
|
|
$(SILENT)$(BIN2C) -i $< $*
|
2007-02-08 18:05:50 +00:00
|
|
|
|