The threading model should be set from configure, not config.h.
[maemo-rb.git] / rbutil / ipodpatcher / Makefile
blobafdcaa5039b92db5e49d588326e3e99a917fb0d5
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 CFLAGS += -Wall -W
12 # Build with "make BOOTOBJS=1" to build with embedded bootloaders and the
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
17 # Releases of ipodpatcher are created with "make RELEASE=1". This
18 # enables BOOTOBJS and uses the VERSION string defined in main.c
19 ifdef RELEASE
20 CFLAGS += -DRELEASE
21 BOOTOBJS=1
22 endif
24 ifdef BOOTOBJS
25 BOOTSRC = ipod1g2g.c ipod3g.c ipod4g.c ipodcolor.c ipodmini1g.c \
26 ipodmini2g.c ipodnano1g.c ipodvideo.c ipodnano2g.c
27 CFLAGS += -DWITH_BOOTOBJS
28 endif
30 ifeq ($(findstring Darwin,$(shell uname)),Darwin)
31 # additional frameworks to link on on OS X
32 LDOPTS += -framework CoreFoundation -framework IOKit
33 endif
35 LIBSOURCES = ipodpatcher.c fat32format.c arc4.c \
36 ipodio-posix.c ipodio-win32-scsi.c ipodio-win32.c
37 SOURCES = main.c $(BOOTSRC) $(LIBSOURCES)
38 ipodpatcher: SOURCES+= ipodio-posix.c
39 ipodpatcher.exe: SOURCES+= ipodpatcher-rc.o
41 OUTPUT = ipodpatcher
42 all: $(OUTPUT)
43 include ../libtools.make
45 $(OBJDIR)ipodpatcher-rc.o: ipodpatcher.rc ipodpatcher.manifest
46 $(CROSS)$(WINDRES) -i ipodpatcher.rc -o ipodpatcher-rc.o
48 %.c: bootloader-%.ipod $(BIN2C)
49 @echo BIN2C $<
50 $(SILENT)$(BIN2C) -i $< $*
52 %.c: bootloader-%.ipodx $(BIN2C)
53 @echo BIN2C $<
54 $(SILENT)$(BIN2C) -i $< $*