2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 CFLAGS
:= -O
-g
-W
-Wall
-Wshadow
-pedantic
11 .PHONY
: rbspeexenc uclpack
13 CLEANALL
:= scramble descramble iriver sh2d bmp2rb rdf2binary convbdf \
14 generate_rocklatin mkboot ipod_fw codepages uclpack mi4 gigabeat lngdump \
15 telechips gigabeats creative hmac-sha1 rbspeexenc mkzenboot mk500boot convttf
17 all: scramble descramble sh2d rdf2binary mkboot mkzenboot convbdf codepages \
18 uclpack rbspeexenc voicefont mk500boot
20 scramble
: scramble.o iriver.o mi4.o gigabeat.o gigabeats.o telechips.o \
21 iaudio_bl_flash.o creative.o hmac-sha1.o rkw.o
22 descramble
: descramble.o iriver.o gigabeat.o
23 scramble.o
: scramble.c iriver.h mi4.h gigabeat.h telechips.h iaudio_bl_flash.h \
26 descramble.o
: descramble.c iriver.h gigabeat.h
27 creative.o
: creative.c creative.h
28 hmac-sha1.o
: hmac-sha1.c hmac-sha1.h
29 iriver.o
: iriver.c iriver.h
30 gigabeat.o
: gigabeat.c gigabeat.h
31 gigabeats.o
: gigabeats.c gigabeats.h
33 telechips.o
: telechips.c telechips.h
35 iaudio_bl_flash.o
: iaudio_bl_flash.c iaudio_bl_flash.h
36 iaudio_bl_flash.c iaudio_bl_flash.h
: iaudio_bl_flash.bmp bmp2rb
37 $(SILENT
).
/bmp2rb
-f
7 -h .
$< >iaudio_bl_flash.c
42 $(SILENT
)$(CC
) -DAPPLICATION_NAME
=\"$@
\" $(CFLAGS
) $+ -o
$@
44 rdf2binary
: rdf2binary.c
45 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
48 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
50 mk500boot
: mk500boot.c mr500.c
51 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
53 mkzenboot.o
: mkzenboot.c
54 $(SILENT
)$(CC
) $(CFLAGS
) -DSTANDALONE
-c
-o
$@
$+
56 mkzenboot
: mkzenboot.o hmac-sha1.o
57 $(SILENT
)$(CC
) $(LDFLAGS
) -lz
$+ -o
$@
59 mkzenboot.exe
: mkzenboot.o hmac-sha1.o
60 $(SILENT
)$(CC
) $(LDFLAGS
) -lz
$+ C
:\MingW\lib\libz.a
-o
$@
63 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
66 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
68 checkwps
: checkwps.c ..
/apps
/gui
/wps_parser.c ..
/apps
/gui
/wps_debug.c \
69 ..
/firmware
/common
/ctype.c ..
/apps
/misc.c ..
/apps
/recorder
/bmp.c
70 $(SILENT
)$(CC
) $(CFLAGS
) -I ..
/apps
/gui
-I..
/firmware
/export \
71 -D__PCTOOL__
-DDEBUG
-DROCKBOX_HAS_LOGF
-DIPOD_COLOR \
72 -D ROCKBOX_DIR_LEN
-D WPS_DIR
=\".
\" -I..
/apps \
73 -I..
/firmware
/target
/arm
/ipod
-I..
/firmware
/include $+ -o
$@
76 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
78 codepages
: codepages.c codepage_tables.c
79 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
81 player_unifont
: player_unifont.c ..
/firmware
/drivers
/lcd-charset-player.c
82 $(SILENT
)$(CC
) -DARCHOS_PLAYER
-D__PCTOOL__
-I..
/firmware
/export $+ \
86 $(SILENT
)$(MAKE
) -C ucl
89 $(SILENT
)$(MAKE
) -C rbspeex
92 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
94 voicefont
: voicefont.c
95 $(SILENT
)$(CC
) $(CFLAGS
) $+ -o
$@
97 usb_benchmark
: usb_benchmark.c
98 $(SILENT
)$(CC
) $(CFLAGS
) -lusb
$+ -o
$@
101 $(call PRINTS
,CC
$(@F
))
102 $(SILENT
)$(CC
) $(CFLAGS
) -lm
-std
=c99
-O2
-Wall
-g
$+ -o
$@ \
103 `freetype-config --libs` `freetype-config --cflags`
106 @echo
"Cleaning tools"
107 $(SILENT
)rm -f
$(CLEANALL
) $(shell for f in
$(CLEANALL
) ; do \
108 echo
$$f.exe
$$f.o
$$f.obj
; done
) *.ajf
*~
109 $(SILENT
)$(MAKE
) -C ucl
clean
110 $(SILENT
)$(MAKE
) -C rbspeex
clean