rockbox/rbutil/ipodpatcher/Makefile
Dominik Riebeling 70837fb1ed sansapatcher, ipodpatcher: use MinGW C99 version of stdio functions.
The MinGW versions know additional format identifiers. Use those versions to
avoid warnings. See also http://article.gmane.org/gmane.comp.gnu.mingw.user/27539/

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31331 a1c6a512-1295-4272-9138-f99709370657
2011-12-16 21:10:21 +00:00

58 lines
1.8 KiB
Makefile

# __________ __ ___.
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
# \/ \/ \/ \/ \/
# $Id$
#
CFLAGS += -Wall -W -D__USE_MINGW_ANSI_STDIO=1
# Build with "make BOOTOBJS=1" to build with embedded bootloaders and the
# --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
# Releases of ipodpatcher are created with "make RELEASE=1". This
# enables BOOTOBJS and uses the VERSION string defined in main.c
ifdef RELEASE
CFLAGS += -DRELEASE
BOOTOBJS=1
endif
ifdef BOOTOBJS
BOOTSRC = ipod1g2g.c ipod3g.c ipod4g.c ipodcolor.c ipodmini1g.c \
ipodmini2g.c ipodnano1g.c ipodvideo.c ipodnano2g.c
CFLAGS += -DWITH_BOOTOBJS
endif
ifeq ($(findstring Darwin,$(shell uname)),Darwin)
# additional frameworks to link on on OS X
LDOPTS += -framework CoreFoundation -framework IOKit
endif
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
OUTPUT = ipodpatcher
all: $(OUTPUT)
include ../libtools.make
$(OBJDIR)ipodpatcher-rc.o: ipodpatcher.rc ipodpatcher.manifest
$(CROSS)$(WINDRES) -i ipodpatcher.rc -o ipodpatcher-rc.o
ipod2c: ipod2c.c
$(NATIVECC) $(CFLAGS) -o ipod2c ipod2c.c
%.c: bootloader-%.ipod ipod2c
@echo IPOD2C $<
$(SILENT)./ipod2c $< $*
%.c: bootloader-%.ipodx ipod2c
@echo IPOD2C $<
$(SILENT)./ipod2c $< $*