6f1efe07d058557f824c20b503fd860450144452
[mw/milkymist.git] / software / demo / Makefile
1 MMDIR?=../..
2 include $(MMDIR)/software/include.mak
3
4 OBJECTS=crt0.o isr.o brd.o time.o mem.o vga.o snd.o slowout.o hdlcd.o tmu.o pfpu.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 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         $(MMDIR)/tools/crc32 $@
31
32 boot.elf: linker.ld $(OBJECTS)
33         $(LD) $(LDFLAGS) -T linker.ld -N -o $@ $(OBJECTS) -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -lbase -lmath
34
35 .PHONY: clean depend
36
37 depend: parser.c scanner.c bandfilters.h spam.h
38         makedepend -Y -- $(CFLAGS) -- *.c
39
40 clean:
41         rm -f $(OBJECTS) scanner.c parser.c parser.h parser.out bandfilters.h spam.raw spam.h boot.elf boot.bin .*~ *~ Makefile.bak
42
43 # DO NOT DELETE
44
45 analyzer.o: ../../software/include/libc.h ../../software/include/console.h
46 analyzer.o: analyzer.h bandfilters.h
47 apipe.o: ../../software/include/libc.h ../../software/include/console.h
48 apipe.o: ../../software/include/board.h brd.h snd.h
49 apipe.o: ../../software/include/hw/ac97.h ../../software/include/hw/common.h
50 apipe.o: analyzer.h eval.h ../../software/include/hw/pfpu.h
51 apipe.o: ../../software/include/hw/tmu.h pfpu.h ast.h time.h cpustats.h
52 apipe.o: rpipe.h tmu.h apipe.h
53 brd.o: ../../software/include/libc.h ../../software/include/console.h
54 brd.o: ../../software/include/board.h brd.h
55 compiler.o: ../../software/include/hw/pfpu.h
56 compiler.o: ../../software/include/hw/common.h ../../software/include/libc.h
57 compiler.o: ../../software/include/console.h compiler.h ast.h
58 cpustats.o: ../../software/include/libc.h ../../software/include/irq.h time.h
59 cpustats.o: cpustats.h
60 eval.o: ../../software/include/libc.h ../../software/include/console.h
61 eval.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
62 eval.o: pfpu.h ast.h compiler.h scheduler.h eval.h
63 eval.o: ../../software/include/hw/tmu.h
64 hdlcd.o: ../../software/include/libc.h ../../software/include/board.h
65 hdlcd.o: ../../software/include/console.h ../../software/include/hw/sysctl.h
66 hdlcd.o: ../../software/include/hw/common.h ../../software/include/hw/gpio.h
67 hdlcd.o: brd.h slowout.h hdlcd.h
68 isr.o: ../../software/include/hw/interrupts.h ../../software/include/irq.h
69 isr.o: ../../software/include/uart.h time.h slowout.h snd.h
70 isr.o: ../../software/include/hw/ac97.h ../../software/include/hw/common.h
71 isr.o: tmu.h ../../software/include/hw/tmu.h pfpu.h
72 isr.o: ../../software/include/hw/pfpu.h ui.h cpustats.h
73 line.o: ../../software/include/libc.h ../../software/include/math.h
74 line.o: ../../software/include/console.h color.h line.h
75 main.o: ../../software/include/libc.h ../../software/include/console.h
76 main.o: ../../software/include/uart.h ../../software/include/system.h
77 main.o: ../../software/include/irq.h ../../software/include/board.h
78 main.o: ../../software/include/version.h ../../software/include/hw/sysctl.h
79 main.o: ../../software/include/hw/common.h ../../software/include/hw/gpio.h
80 main.o: ../../software/include/hw/interrupts.h brd.h mem.h time.h vga.h snd.h
81 main.o: ../../software/include/hw/ac97.h tmu.h
82 main.o: ../../software/include/hw/tmu.h pfpu.h
83 main.o: ../../software/include/hw/pfpu.h apipe.h rpipe.h renderer.h slowout.h
84 main.o: hdlcd.h ui.h cpustats.h shell.h
85 mem.o: ../../software/include/libc.h ../../software/include/console.h
86 mem.o: ../../software/include/malloc.h ../../software/include/hw/sram.h mem.h
87 parser.o: ../../software/include/stdio.h ../../software/include/libc.h
88 parser.o: ../../software/include/console.h ../../software/include/malloc.h
89 parser.o: ../../software/include/math.h ast.h
90 parser_helper.o: ../../software/include/libc.h
91 parser_helper.o: ../../software/include/malloc.h
92 parser_helper.o: ../../software/include/console.h scanner.h parser.h ast.h
93 parser_helper.o: parser_helper.h
94 pfpu.o: ../../software/include/libc.h ../../software/include/console.h
95 pfpu.o: ../../software/include/irq.h ../../software/include/hw/interrupts.h
96 pfpu.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
97 pfpu.o: pfpu.h
98 renderer.o: ../../software/include/libc.h ../../software/include/console.h
99 renderer.o: ../../software/include/math.h ../../software/include/system.h
100 renderer.o: ../../software/include/hw/sysctl.h
101 renderer.o: ../../software/include/hw/common.h
102 renderer.o: ../../software/include/hw/uart.h ../../software/include/hw/ac97.h
103 renderer.o: ../../software/include/hw/tmu.h parser_helper.h ast.h pfpu.h
104 renderer.o: ../../software/include/hw/pfpu.h vga.h eval.h apipe.h renderer.h
105 rpipe.o: ../../software/include/libc.h ../../software/include/console.h
106 rpipe.o: ../../software/include/irq.h ../../software/include/system.h
107 rpipe.o: ../../software/include/math.h ../../software/include/hw/interrupts.h
108 rpipe.o: renderer.h vga.h tmu.h ../../software/include/hw/tmu.h
109 rpipe.o: ../../software/include/hw/common.h wave.h cpustats.h rpipe.h spam.h
110 scanner.o: ../../software/include/libc.h ../../software/include/malloc.h
111 scanner.o: scanner.h parser.h
112 scheduler.o: ../../software/include/libc.h ../../software/include/console.h
113 scheduler.o: ../../software/include/hw/pfpu.h
114 scheduler.o: ../../software/include/hw/common.h scheduler.h compiler.h ast.h
115 shell.o: ../../software/include/libc.h ../../software/include/console.h
116 shell.o: ../../software/include/uart.h ../../software/include/cffat.h
117 shell.o: ../../software/include/system.h ../../software/include/math.h
118 shell.o: ../../software/include/irq.h ../../software/include/board.h
119 shell.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
120 shell.o: ../../software/include/hw/tmu.h ../../software/include/hw/sysctl.h
121 shell.o: ../../software/include/hw/gpio.h
122 shell.o: ../../software/include/hw/interrupts.h vga.h snd.h
123 shell.o: ../../software/include/hw/ac97.h tmu.h line.h wave.h time.h brd.h
124 shell.o: rpipe.h cpustats.h shell.h ui.h
125 slowout.o: ../../software/include/libc.h ../../software/include/console.h
126 slowout.o: ../../software/include/irq.h
127 slowout.o: ../../software/include/hw/interrupts.h
128 slowout.o: ../../software/include/hw/sysctl.h
129 slowout.o: ../../software/include/hw/common.h
130 snd.o: ../../software/include/libc.h ../../software/include/console.h
131 snd.o: ../../software/include/irq.h ../../software/include/hw/ac97.h
132 snd.o: ../../software/include/hw/common.h
133 snd.o: ../../software/include/hw/interrupts.h snd.h
134 time.o: ../../software/include/libc.h ../../software/include/console.h
135 time.o: ../../software/include/irq.h ../../software/include/board.h
136 time.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
137 time.o: ../../software/include/hw/interrupts.h brd.h rpipe.h tmu.h
138 time.o: ../../software/include/hw/tmu.h cpustats.h ui.h time.h
139 tmu.o: ../../software/include/libc.h ../../software/include/console.h
140 tmu.o: ../../software/include/irq.h ../../software/include/board.h
141 tmu.o: ../../software/include/hw/interrupts.h ../../software/include/hw/tmu.h
142 tmu.o: ../../software/include/hw/common.h brd.h tmu.h
143 ui.o: ../../software/include/libc.h ../../software/include/console.h
144 ui.o: ../../software/include/cffat.h ../../software/include/irq.h
145 ui.o: ../../software/include/version.h ../../software/include/hw/interrupts.h
146 ui.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
147 ui.o: ../../software/include/hw/gpio.h renderer.h hdlcd.h time.h rpipe.h
148 ui.o: tmu.h ../../software/include/hw/tmu.h cpustats.h ui.h
149 vga.o: ../../software/include/console.h ../../software/include/hw/vga.h
150 vga.o: ../../software/include/hw/common.h
151 wave.o: ../../software/include/libc.h ../../software/include/math.h
152 wave.o: ../../software/include/console.h line.h color.h wave.h renderer.h