Prepare new maemo release
[maemo-rb.git] / tools / Makefile
blob6448f64c3b762eb61d9fe834c534ca9b33983e2a
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
8 CFLAGS := -O -g -W -Wall -Wshadow -pedantic
9 LDFLAGS := -g
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 \
24 creative.h rkw.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
32 mi4.o: mi4.c mi4.h
33 telechips.o: telechips.c telechips.h
34 rkw.o: rkw.c rkw.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
39 sh2d: sh2d.c
41 bmp2rb: bmp2rb.c
42 $(SILENT)$(CC) -DAPPLICATION_NAME=\"$@\" $(CFLAGS) $+ -o $@
44 rdf2binary: rdf2binary.c
45 $(SILENT)$(CC) $(CFLAGS) $+ -o $@
47 mkboot: mkboot.c
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 $@
62 lngdump: lngdump.c
63 $(SILENT)$(CC) $(CFLAGS) $+ -o $@
65 ipod_fw: ipod_fw.c
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 $@
75 convbdf: convbdf.c
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 $+ \
83 -o $@
85 uclpack:
86 $(SILENT)$(MAKE) -C ucl
88 rbspeexenc:
89 $(SILENT)$(MAKE) -C rbspeex
91 wavtrim: wavtrim.c
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 $@
100 convttf: convttf.c
101 $(call PRINTS,CC $(@F))
102 $(SILENT)$(CC) $(CFLAGS) -lm -std=c99 -O2 -Wall -g $+ -o $@ \
103 `freetype-config --libs` `freetype-config --cflags`
105 clean:
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