ea090713b5e6df0db9fc1a98a31297cc0dd0eba1
[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 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/stdio.h ../../software/include/stdlib.h
48 analyzer.o: analyzer.h bandfilters.h
49 apipe.o: ../../software/include/stdio.h ../../software/include/stdlib.h
50 apipe.o: ../../software/include/board.h ../../software/include/hal/brd.h
51 apipe.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
52 apipe.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
53 apipe.o: ../../software/include/hw/pfpu.h ../../software/include/hal/time.h
54 apipe.o: analyzer.h eval.h ../../software/include/hw/tmu.h ast.h cpustats.h
55 apipe.o: rpipe.h ../../software/include/hal/tmu.h apipe.h
56 compiler.o: ../../software/include/stdio.h ../../software/include/stdlib.h
57 compiler.o: ../../software/include/string.h ../../software/include/hw/pfpu.h
58 compiler.o: ../../software/include/hw/common.h compiler.h ast.h
59 cpustats.o: ../../software/include/stdio.h ../../software/include/stdlib.h
60 cpustats.o: ../../software/include/irq.h ../../software/include/hal/time.h
61 cpustats.o: cpustats.h
62 eval.o: ../../software/include/stdio.h ../../software/include/stdlib.h
63 eval.o: ../../software/include/string.h ../../software/include/hw/pfpu.h
64 eval.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
65 eval.o: ast.h compiler.h scheduler.h eval.h ../../software/include/hw/tmu.h
66 isr.o: ../../software/include/hw/interrupts.h ../../software/include/irq.h
67 isr.o: ../../software/include/uart.h ../../software/include/hal/time.h
68 isr.o: ../../software/include/hal/slowout.h ../../software/include/hal/snd.h
69 isr.o: ../../software/include/hw/ac97.h ../../software/include/hw/common.h
70 isr.o: ../../software/include/hal/pfpu.h ../../software/include/hw/pfpu.h
71 isr.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h ui.h
72 isr.o: cpustats.h
73 line.o: ../../software/include/stdlib.h ../../software/include/math.h color.h
74 line.o: line.h
75 main.o: ../../software/include/stdio.h ../../software/include/stdlib.h
76 main.o: ../../software/include/console.h ../../software/include/uart.h
77 main.o: ../../software/include/system.h ../../software/include/irq.h
78 main.o: ../../software/include/board.h ../../software/include/version.h
79 main.o: ../../software/include/hal/brd.h ../../software/include/hal/mem.h
80 main.o: ../../software/include/hal/time.h ../../software/include/hal/vga.h
81 main.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
82 main.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
83 main.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
84 main.o: ../../software/include/hw/tmu.h ../../software/include/hal/slowout.h
85 main.o: ../../software/include/hal/hdlcd.h apipe.h rpipe.h renderer.h ui.h
86 main.o: cpustats.h shell.h
87 parser.o: ../../software/include/stdio.h ../../software/include/stdlib.h
88 parser.o: ../../software/include/assert.h ../../software/include/string.h
89 parser.o: ../../software/include/malloc.h ../../software/include/math.h ast.h
90 parser_helper.o: ../../software/include/stdio.h
91 parser_helper.o: ../../software/include/stdlib.h
92 parser_helper.o: ../../software/include/malloc.h scanner.h parser.h ast.h
93 parser_helper.o: parser_helper.h
94 renderer.o: ../../software/include/stdio.h ../../software/include/stdlib.h
95 renderer.o: ../../software/include/math.h ../../software/include/system.h
96 renderer.o: ../../software/include/hal/pfpu.h
97 renderer.o: ../../software/include/hw/pfpu.h
98 renderer.o: ../../software/include/hw/common.h
99 renderer.o: ../../software/include/hal/vga.h parser_helper.h ast.h eval.h
100 renderer.o: ../../software/include/hw/tmu.h apipe.h renderer.h
101 rpipe.o: ../../software/include/stdio.h ../../software/include/stdlib.h
102 rpipe.o: ../../software/include/irq.h ../../software/include/system.h
103 rpipe.o: ../../software/include/math.h ../../software/include/hw/interrupts.h
104 rpipe.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
105 rpipe.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
106 rpipe.o: renderer.h wave.h cpustats.h rpipe.h spam.h
107 scanner.o: ../../software/include/stdio.h ../../software/include/stdlib.h
108 scanner.o: ../../software/include/string.h ../../software/include/malloc.h
109 scanner.o: scanner.h parser.h
110 scheduler.o: ../../software/include/stdio.h ../../software/include/stdlib.h
111 scheduler.o: ../../software/include/hw/pfpu.h
112 scheduler.o: ../../software/include/hw/common.h scheduler.h compiler.h ast.h
113 shell.o: ../../software/include/stdio.h ../../software/include/stdlib.h
114 shell.o: ../../software/include/string.h ../../software/include/console.h
115 shell.o: ../../software/include/uart.h ../../software/include/cffat.h
116 shell.o: ../../software/include/system.h ../../software/include/math.h
117 shell.o: ../../software/include/irq.h ../../software/include/board.h
118 shell.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
119 shell.o: ../../software/include/hw/tmu.h ../../software/include/hw/sysctl.h
120 shell.o: ../../software/include/hw/gpio.h
121 shell.o: ../../software/include/hw/interrupts.h
122 shell.o: ../../software/include/hal/vga.h ../../software/include/hal/snd.h
123 shell.o: ../../software/include/hw/ac97.h ../../software/include/hal/tmu.h
124 shell.o: ../../software/include/hal/time.h ../../software/include/hal/brd.h
125 shell.o: line.h wave.h rpipe.h cpustats.h shell.h ui.h
126 tick.o: ../../software/include/hal/time.h rpipe.h
127 tick.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
128 tick.o: ../../software/include/hw/common.h cpustats.h ui.h
129 ui.o: ../../software/include/stdio.h ../../software/include/stdlib.h
130 ui.o: ../../software/include/string.h ../../software/include/cffat.h
131 ui.o: ../../software/include/irq.h ../../software/include/version.h
132 ui.o: ../../software/include/hw/interrupts.h
133 ui.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
134 ui.o: ../../software/include/hw/gpio.h ../../software/include/hal/hdlcd.h
135 ui.o: ../../software/include/hal/time.h renderer.h rpipe.h
136 ui.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
137 ui.o: cpustats.h ui.h
138 wave.o: ../../software/include/math.h line.h color.h wave.h renderer.h