2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 #value for crosscompiling on linux
11 PREFIX
=i586-mingw32msvc-
13 #value for compiling on cygwin
16 TARGET
= fwpatchernu.exe
17 TARGETU
= fwpatcher.exe
19 WINDRES
= $(PREFIX
)windres
22 UNICODE
= -DUNICODE
-D_UNICODE
25 VERSION
=$(shell date
+%y
%m
%d-
%H
%M
)
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
)
42 $(CC
) $(LDFLAGS
) $(OBJS
) -o
$@
45 $(CC
) $(LDFLAGS
) $(OBJSU
) -o
$@
47 resource.o
: resource.rc bootloader-h100.bin bootloader-h120.bin bootloader-h300.bin rockbox.ico
50 iriveru.o
: iriver.c iriver.h
51 $(CC
) $(CFLAGS
) $(UNICODE
) -c
$< -o
$@
53 iriver.o
: iriver.c iriver.h
56 $(CC
) $(CFLAGS
) $(UNICODE
) -c
$< -o
$@
63 rm -f
$(OBJSU
) $(OBJS
) $(TARGETU
) $(TARGET
)