b7ae0c533c70456632e2d988729dd60d59a8b950
[mw/milkymist.git] / software / demo / Makefile
1 MMDIR=../..
2 include $(MMDIR)/software/include.mak
3
4 OBJECTS=crt0.o isr.o tick.o wave.o analyzer.o scanner.o parser.o parser_helper.o compiler.o scheduler.o eval.o line.o apipe.o rpipe.o renderer.o cpustats.o memstats.o shell.o ui.o main.o
5 SEGMENTS=-j .text -j .data -j .rodata
6
7 all: boot.bin
8
9 %.c: %.re
10         re2c -o $@ $<
11
12 scanner.c: parser.h
13
14 parser.h: parser.c
15
16 %.c: %.y
17         lemon $<
18
19 bandfilters.h: bandfilters.sce
20         scilab -nw -nwni -nogui -nb -f bandfilters.sce
21
22 spam.raw: spam.png
23         $(MMDIR)/tools/makeraw spam.png
24
25 spam.h: spam.raw
26         xxd -i spam.raw spam.h
27
28 %.bin: %.elf
29         $(OBJCOPY) $(SEGMENTS) -O binary $< $@
30         chmod -x $@
31         $(MMDIR)/tools/crc32 $@
32
33 boot.elf: linker.ld $(OBJECTS) $(MMDIR)/software/libbase/libbase.a $(MMDIR)/software/libmath/libmath.a $(MMDIR)/software/libhal/libhal.a
34         $(LD) $(LDFLAGS) -T linker.ld -N -o $@ -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -L$(MMDIR)/software/libhal --start-group $(OBJECTS) -lbase -lmath -lhal --end-group
35         chmod -x $@
36
37 .PHONY: clean depend
38
39 depend: parser.c scanner.c bandfilters.h spam.h
40         makedepend -Y -- $(CFLAGS) -- *.c
41
42 clean:
43         rm -f $(OBJECTS) scanner.c parser.c parser.h parser.out bandfilters.h spam.raw spam.h boot.elf boot.bin .*~ *~ Makefile.bak
44
45 # DO NOT DELETE
46
47 analyzer.o: ../../software/include/base/stdio.h
48 analyzer.o: ../../software/include/base/stdlib.h analyzer.h bandfilters.h
49 apipe.o: ../../software/include/base/stdio.h
50 apipe.o: ../../software/include/base/stdlib.h
51 apipe.o: ../../software/include/base/board.h ../../software/include/hal/brd.h
52 apipe.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
53 apipe.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
54 apipe.o: ../../software/include/hw/pfpu.h ../../software/include/hal/time.h
55 apipe.o: analyzer.h eval.h ../../software/include/hw/tmu.h ast.h cpustats.h
56 apipe.o: rpipe.h ../../software/include/hal/tmu.h apipe.h
57 compiler.o: ../../software/include/base/stdio.h
58 compiler.o: ../../software/include/base/stdlib.h
59 compiler.o: ../../software/include/base/string.h
60 compiler.o: ../../software/include/hw/pfpu.h
61 compiler.o: ../../software/include/hw/common.h compiler.h ast.h
62 cpustats.o: ../../software/include/base/stdio.h
63 cpustats.o: ../../software/include/base/stdlib.h
64 cpustats.o: ../../software/include/base/irq.h
65 cpustats.o: ../../software/include/hal/time.h cpustats.h
66 eval.o: ../../software/include/base/stdio.h
67 eval.o: ../../software/include/base/stdlib.h
68 eval.o: ../../software/include/base/string.h ../../software/include/hw/pfpu.h
69 eval.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
70 eval.o: ../../software/include/hal/pfpu.h ast.h compiler.h scheduler.h eval.h
71 isr.o: ../../software/include/hw/interrupts.h
72 isr.o: ../../software/include/base/irq.h ../../software/include/base/uart.h
73 isr.o: ../../software/include/hal/time.h ../../software/include/hal/slowout.h
74 isr.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
75 isr.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
76 isr.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
77 isr.o: ../../software/include/hw/tmu.h ui.h cpustats.h
78 line.o: ../../software/include/base/stdlib.h
79 line.o: ../../software/include/base/math.h color.h line.h
80 main.o: ../../software/include/base/stdio.h
81 main.o: ../../software/include/base/stdlib.h
82 main.o: ../../software/include/base/console.h
83 main.o: ../../software/include/base/uart.h
84 main.o: ../../software/include/base/system.h
85 main.o: ../../software/include/base/irq.h ../../software/include/base/board.h
86 main.o: ../../software/include/base/version.h
87 main.o: ../../software/include/hal/brd.h ../../software/include/hal/mem.h
88 main.o: ../../software/include/hal/time.h ../../software/include/hal/vga.h
89 main.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
90 main.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
91 main.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
92 main.o: ../../software/include/hw/tmu.h ../../software/include/hal/slowout.h
93 main.o: ../../software/include/hal/hdlcd.h apipe.h rpipe.h renderer.h ui.h
94 main.o: cpustats.h memstats.h shell.h
95 memstats.o: ../../software/include/base/board.h
96 memstats.o: ../../software/include/hal/brd.h
97 memstats.o: ../../software/include/hw/fmlmeter.h
98 memstats.o: ../../software/include/hw/common.h
99 parser.o: ../../software/include/base/stdio.h
100 parser.o: ../../software/include/base/stdlib.h
101 parser.o: ../../software/include/base/assert.h
102 parser.o: ../../software/include/base/string.h
103 parser.o: ../../software/include/base/malloc.h
104 parser.o: ../../software/include/base/math.h ast.h
105 parser_helper.o: ../../software/include/base/stdio.h
106 parser_helper.o: ../../software/include/base/stdlib.h
107 parser_helper.o: ../../software/include/base/malloc.h scanner.h parser.h
108 parser_helper.o: ast.h parser_helper.h
109 renderer.o: ../../software/include/base/stdio.h
110 renderer.o: ../../software/include/base/stdlib.h
111 renderer.o: ../../software/include/base/math.h
112 renderer.o: ../../software/include/base/system.h
113 renderer.o: ../../software/include/hal/pfpu.h
114 renderer.o: ../../software/include/hw/pfpu.h
115 renderer.o: ../../software/include/hw/common.h
116 renderer.o: ../../software/include/hal/vga.h parser_helper.h ast.h eval.h
117 renderer.o: ../../software/include/hw/tmu.h apipe.h renderer.h
118 rpipe.o: ../../software/include/base/stdio.h
119 rpipe.o: ../../software/include/base/stdlib.h
120 rpipe.o: ../../software/include/base/irq.h
121 rpipe.o: ../../software/include/base/system.h
122 rpipe.o: ../../software/include/base/math.h
123 rpipe.o: ../../software/include/hw/interrupts.h
124 rpipe.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
125 rpipe.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
126 rpipe.o: renderer.h wave.h cpustats.h color.h line.h rpipe.h spam.h
127 scanner.o: ../../software/include/base/stdio.h
128 scanner.o: ../../software/include/base/stdlib.h
129 scanner.o: ../../software/include/base/string.h
130 scanner.o: ../../software/include/base/malloc.h scanner.h parser.h
131 scheduler.o: ../../software/include/base/stdio.h
132 scheduler.o: ../../software/include/base/stdlib.h
133 scheduler.o: ../../software/include/hw/pfpu.h
134 scheduler.o: ../../software/include/hw/common.h scheduler.h compiler.h ast.h
135 shell.o: ../../software/include/base/stdio.h
136 shell.o: ../../software/include/base/stdlib.h
137 shell.o: ../../software/include/base/string.h
138 shell.o: ../../software/include/base/console.h
139 shell.o: ../../software/include/base/uart.h
140 shell.o: ../../software/include/base/cffat.h
141 shell.o: ../../software/include/base/system.h
142 shell.o: ../../software/include/base/math.h ../../software/include/base/irq.h
143 shell.o: ../../software/include/base/board.h ../../software/include/hw/pfpu.h
144 shell.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
145 shell.o: ../../software/include/hw/sysctl.h ../../software/include/hw/gpio.h
146 shell.o: ../../software/include/hw/interrupts.h
147 shell.o: ../../software/include/hw/minimac.h ../../software/include/hal/vga.h
148 shell.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
149 shell.o: ../../software/include/hal/tmu.h ../../software/include/hal/time.h
150 shell.o: ../../software/include/hal/brd.h line.h wave.h rpipe.h cpustats.h
151 shell.o: memstats.h shell.h ui.h
152 tick.o: ../../software/include/hal/time.h rpipe.h
153 tick.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
154 tick.o: ../../software/include/hw/common.h cpustats.h memstats.h ui.h
155 ui.o: ../../software/include/base/stdio.h
156 ui.o: ../../software/include/base/stdlib.h
157 ui.o: ../../software/include/base/string.h
158 ui.o: ../../software/include/base/cffat.h ../../software/include/base/irq.h
159 ui.o: ../../software/include/base/version.h
160 ui.o: ../../software/include/hw/interrupts.h
161 ui.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
162 ui.o: ../../software/include/hw/gpio.h ../../software/include/hal/hdlcd.h
163 ui.o: ../../software/include/hal/time.h renderer.h rpipe.h
164 ui.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
165 ui.o: cpustats.h ui.h
166 wave.o: ../../software/include/base/math.h line.h color.h wave.h renderer.h