HAL
[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         $(MMDIR)/tools/crc32 $@
31
32 boot.elf: linker.ld $(OBJECTS)
33         $(LD) $(LDFLAGS) -T linker.ld -N -o $@ -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libhal --start-group $(OBJECTS) -lbase -lmath -lhal --end-group
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 ../../software/include/hal/brd.h
49 apipe.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
50 apipe.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
51 apipe.o: ../../software/include/hw/pfpu.h ../../software/include/hal/time.h
52 apipe.o: analyzer.h eval.h ../../software/include/hw/tmu.h ast.h cpustats.h
53 apipe.o: rpipe.h ../../software/include/hal/tmu.h apipe.h
54 compiler.o: ../../software/include/hw/pfpu.h
55 compiler.o: ../../software/include/hw/common.h ../../software/include/libc.h
56 compiler.o: ../../software/include/console.h compiler.h ast.h
57 cpustats.o: ../../software/include/libc.h ../../software/include/irq.h
58 cpustats.o: ../../software/include/hal/time.h cpustats.h
59 eval.o: ../../software/include/libc.h ../../software/include/console.h
60 eval.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
61 eval.o: ../../software/include/hal/pfpu.h ast.h compiler.h scheduler.h eval.h
62 eval.o: ../../software/include/hw/tmu.h
63 isr.o: ../../software/include/hw/interrupts.h ../../software/include/irq.h
64 isr.o: ../../software/include/uart.h ../../software/include/hal/time.h
65 isr.o: ../../software/include/hal/slowout.h ../../software/include/hal/snd.h
66 isr.o: ../../software/include/hw/ac97.h ../../software/include/hw/common.h
67 isr.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
68 isr.o: ../../software/include/hal/pfpu.h ../../software/include/hw/pfpu.h
69 isr.o: ui.h cpustats.h
70 line.o: ../../software/include/libc.h ../../software/include/math.h
71 line.o: ../../software/include/console.h color.h line.h
72 main.o: ../../software/include/libc.h ../../software/include/console.h
73 main.o: ../../software/include/uart.h ../../software/include/system.h
74 main.o: ../../software/include/irq.h ../../software/include/board.h
75 main.o: ../../software/include/version.h ../../software/include/hw/sysctl.h
76 main.o: ../../software/include/hw/common.h ../../software/include/hw/gpio.h
77 main.o: ../../software/include/hw/interrupts.h
78 main.o: ../../software/include/hal/brd.h ../../software/include/hal/mem.h
79 main.o: ../../software/include/hal/time.h ../../software/include/hal/vga.h
80 main.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
81 main.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
82 main.o: ../../software/include/hal/pfpu.h ../../software/include/hw/pfpu.h
83 main.o: ../../software/include/hal/slowout.h
84 main.o: ../../software/include/hal/hdlcd.h apipe.h rpipe.h renderer.h ui.h
85 main.o: cpustats.h shell.h
86 parser.o: ../../software/include/stdio.h ../../software/include/libc.h
87 parser.o: ../../software/include/console.h ../../software/include/malloc.h
88 parser.o: ../../software/include/math.h ast.h
89 parser_helper.o: ../../software/include/libc.h
90 parser_helper.o: ../../software/include/malloc.h
91 parser_helper.o: ../../software/include/console.h scanner.h parser.h ast.h
92 parser_helper.o: parser_helper.h
93 renderer.o: ../../software/include/libc.h ../../software/include/console.h
94 renderer.o: ../../software/include/math.h ../../software/include/system.h
95 renderer.o: ../../software/include/hal/pfpu.h
96 renderer.o: ../../software/include/hw/pfpu.h
97 renderer.o: ../../software/include/hw/common.h
98 renderer.o: ../../software/include/hal/vga.h parser_helper.h ast.h eval.h
99 renderer.o: ../../software/include/hw/tmu.h apipe.h renderer.h
100 rpipe.o: ../../software/include/libc.h ../../software/include/console.h
101 rpipe.o: ../../software/include/irq.h ../../software/include/system.h
102 rpipe.o: ../../software/include/math.h ../../software/include/hw/interrupts.h
103 rpipe.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
104 rpipe.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
105 rpipe.o: renderer.h wave.h cpustats.h rpipe.h spam.h
106 scanner.o: ../../software/include/libc.h ../../software/include/malloc.h
107 scanner.o: scanner.h parser.h
108 scheduler.o: ../../software/include/libc.h ../../software/include/console.h
109 scheduler.o: ../../software/include/hw/pfpu.h
110 scheduler.o: ../../software/include/hw/common.h scheduler.h compiler.h ast.h
111 shell.o: ../../software/include/libc.h ../../software/include/console.h
112 shell.o: ../../software/include/uart.h ../../software/include/cffat.h
113 shell.o: ../../software/include/system.h ../../software/include/math.h
114 shell.o: ../../software/include/irq.h ../../software/include/board.h
115 shell.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
116 shell.o: ../../software/include/hw/tmu.h ../../software/include/hw/sysctl.h
117 shell.o: ../../software/include/hw/gpio.h
118 shell.o: ../../software/include/hw/interrupts.h
119 shell.o: ../../software/include/hal/vga.h ../../software/include/hal/snd.h
120 shell.o: ../../software/include/hw/ac97.h ../../software/include/hal/tmu.h
121 shell.o: ../../software/include/hal/time.h ../../software/include/hal/brd.h
122 shell.o: line.h wave.h rpipe.h cpustats.h shell.h ui.h
123 tick.o: ../../software/include/hal/time.h rpipe.h
124 tick.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
125 tick.o: ../../software/include/hw/common.h cpustats.h ui.h
126 ui.o: ../../software/include/libc.h ../../software/include/console.h
127 ui.o: ../../software/include/cffat.h ../../software/include/irq.h
128 ui.o: ../../software/include/version.h ../../software/include/hw/interrupts.h
129 ui.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
130 ui.o: ../../software/include/hw/gpio.h ../../software/include/hal/hdlcd.h
131 ui.o: ../../software/include/hal/time.h renderer.h rpipe.h
132 ui.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
133 ui.o: cpustats.h ui.h
134 wave.o: ../../software/include/libc.h ../../software/include/math.h
135 wave.o: ../../software/include/console.h line.h color.h wave.h renderer.h