Allow batteries with higher capacity for iPod Mini1G, Mini2G and Video (FS#8973).
[kugel-rb.git] / tools / fwpatcher / Makefile
bloba209be183e3ae6f46f6b91cb350bc8f7742078ba
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 #value for crosscompiling on linux
11 PREFIX=i586-mingw32msvc-
13 #value for compiling on cygwin
14 #PREFIX=
16 TARGET = fwpatchernu.exe
17 TARGETU = fwpatcher.exe
19 WINDRES = $(PREFIX)windres
20 CC = $(PREFIX)gcc
22 UNICODE = -DUNICODE -D_UNICODE
24 ifndef VERSION
25 VERSION=$(shell date +%y%m%d-%H%M)
26 endif
28 #values for crosscompiling on linux
29 CFLAGS = -DAPPSVERSION=\"$(VERSION)\" -I. -Os -s -fomit-frame-pointer
30 LDFLAGS = -lmingw32 -mwindows -s
32 #values for compiling on cygwin
33 #CFLAGS = -I. -Os -s -fomit-frame-pointer -mno-cygwin -DNOCYGWIN
34 #LDFLAGS = -lmingw32 -mwindows -s -mno-cygwin
36 OBJS= resource.o iriver.o main.o md5.o
37 OBJSU= resource.o iriveru.o mainu.o md5.o
39 all: $(TARGET) $(TARGETU)
41 $(TARGET): $(OBJS)
42 $(CC) $(LDFLAGS) $(OBJS) -o $@
44 $(TARGETU): $(OBJSU)
45 $(CC) $(LDFLAGS) $(OBJSU) -o $@
47 resource.o: resource.rc bootloader-h100.bin bootloader-h120.bin bootloader-h300.bin rockbox.ico
48 $(WINDRES) -v $< $@
50 iriveru.o: iriver.c iriver.h
51 $(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
53 iriver.o: iriver.c iriver.h
55 mainu.o: main.c
56 $(CC) $(CFLAGS) $(UNICODE) -c $< -o $@
58 main.o: main.c
60 md5.o: md5.c md5.h
62 clean:
63 rm -f $(OBJSU) $(OBJS) $(TARGETU) $(TARGET)