BIOS starting on M1, SDRAM not working
[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 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 bandfilters.h: bandfilters.sce
10         scilab -nw -nwni -nogui -nb -f bandfilters.sce
11
12 spam.raw: spam.png
13         $(MMDIR)/tools/makeraw spam.png
14
15 spam.h: spam.raw
16         xxd -i spam.raw spam.h
17
18 %.bin: %.elf
19         $(OBJCOPY) $(SEGMENTS) -O binary $< $@
20         chmod -x $@
21         $(MMDIR)/tools/crc32 $@
22
23 boot.elf: linker.ld $(OBJECTS)
24         $(MAKE) -C $(MMDIR)/software/libbase
25         $(MAKE) -C $(MMDIR)/software/libmath
26         $(MAKE) -C $(MMDIR)/software/libhal
27         $(MAKE) -C $(MMDIR)/software/libfpvm
28         $(LD) $(LDFLAGS) -T linker.ld -N -o $@ -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libmath -L$(MMDIR)/software/libhal -L$(MMDIR)/software/libfpvm --start-group $(OBJECTS) -lbase -lmath -lhal -lfpvm --end-group
29         chmod -x $@
30
31 .PHONY: clean depend boot.elf
32
33 depend: bandfilters.h spam.h
34         makedepend -Y -- $(CFLAGS) -- *.c
35
36 clean:
37         rm -f $(OBJECTS) bandfilters.h spam.raw spam.h boot.elf boot.bin .*~ *~ Makefile.bak
38
39 # DO NOT DELETE
40
41 analyzer.o: ../../software/include/base/stdio.h
42 analyzer.o: ../../software/include/base/stdlib.h analyzer.h bandfilters.h
43 apipe.o: ../../software/include/base/stdio.h
44 apipe.o: ../../software/include/base/stdlib.h
45 apipe.o: ../../software/include/base/board.h ../../software/include/hal/brd.h
46 apipe.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
47 apipe.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
48 apipe.o: ../../software/include/hw/pfpu.h ../../software/include/hal/time.h
49 apipe.o: analyzer.h eval.h ../../software/include/hw/tmu.h cpustats.h rpipe.h
50 apipe.o: ../../software/include/hal/tmu.h apipe.h
51 cpustats.o: ../../software/include/base/stdio.h
52 cpustats.o: ../../software/include/base/stdlib.h
53 cpustats.o: ../../software/include/base/irq.h
54 cpustats.o: ../../software/include/hal/time.h cpustats.h
55 eval.o: ../../software/include/base/stdio.h
56 eval.o: ../../software/include/base/stdlib.h
57 eval.o: ../../software/include/base/string.h ../../software/include/hw/pfpu.h
58 eval.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
59 eval.o: ../../software/include/hal/pfpu.h ../../software/include/fpvm/fpvm.h
60 eval.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/gfpus.h
61 eval.o: ../../software/include/fpvm/pfpu.h eval.h renderer.h
62 isr.o: ../../software/include/hw/interrupts.h
63 isr.o: ../../software/include/base/irq.h ../../software/include/base/uart.h
64 isr.o: ../../software/include/hal/time.h ../../software/include/hal/slowout.h
65 isr.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
66 isr.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
67 isr.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
68 isr.o: ../../software/include/hw/tmu.h ui.h cpustats.h
69 line.o: ../../software/include/base/stdlib.h
70 line.o: ../../software/include/base/math.h color.h line.h
71 main.o: ../../software/include/base/stdio.h
72 main.o: ../../software/include/base/stdlib.h
73 main.o: ../../software/include/base/console.h
74 main.o: ../../software/include/base/uart.h
75 main.o: ../../software/include/base/system.h
76 main.o: ../../software/include/base/irq.h ../../software/include/base/board.h
77 main.o: ../../software/include/base/version.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/hw/common.h ../../software/include/hal/pfpu.h
82 main.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
83 main.o: ../../software/include/hw/tmu.h ../../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 memstats.h shell.h
86 memstats.o: ../../software/include/base/board.h
87 memstats.o: ../../software/include/hal/brd.h
88 memstats.o: ../../software/include/hw/fmlmeter.h
89 memstats.o: ../../software/include/hw/common.h
90 renderer.o: ../../software/include/base/stdio.h
91 renderer.o: ../../software/include/base/stdlib.h
92 renderer.o: ../../software/include/base/string.h
93 renderer.o: ../../software/include/base/math.h
94 renderer.o: ../../software/include/base/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 eval.h
99 renderer.o: ../../software/include/hw/tmu.h apipe.h renderer.h
100 rpipe.o: ../../software/include/base/stdio.h
101 rpipe.o: ../../software/include/base/stdlib.h
102 rpipe.o: ../../software/include/base/irq.h
103 rpipe.o: ../../software/include/base/system.h
104 rpipe.o: ../../software/include/base/math.h
105 rpipe.o: ../../software/include/hw/interrupts.h
106 rpipe.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
107 rpipe.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
108 rpipe.o: renderer.h wave.h cpustats.h color.h line.h rpipe.h spam.h
109 shell.o: ../../software/include/base/stdio.h
110 shell.o: ../../software/include/base/stdlib.h
111 shell.o: ../../software/include/base/string.h
112 shell.o: ../../software/include/base/console.h
113 shell.o: ../../software/include/base/uart.h
114 shell.o: ../../software/include/base/cffat.h
115 shell.o: ../../software/include/base/system.h
116 shell.o: ../../software/include/base/math.h ../../software/include/base/irq.h
117 shell.o: ../../software/include/base/board.h ../../software/include/hw/pfpu.h
118 shell.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
119 shell.o: ../../software/include/hw/sysctl.h ../../software/include/hw/gpio.h
120 shell.o: ../../software/include/hw/interrupts.h
121 shell.o: ../../software/include/hw/minimac.h ../../software/include/hal/vga.h
122 shell.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
123 shell.o: ../../software/include/hal/tmu.h ../../software/include/hal/time.h
124 shell.o: ../../software/include/hal/brd.h line.h wave.h rpipe.h cpustats.h
125 shell.o: memstats.h shell.h ui.h renderer.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 memstats.h ui.h
129 ui.o: ../../software/include/base/stdio.h
130 ui.o: ../../software/include/base/stdlib.h
131 ui.o: ../../software/include/base/string.h
132 ui.o: ../../software/include/base/cffat.h ../../software/include/base/irq.h
133 ui.o: ../../software/include/base/version.h
134 ui.o: ../../software/include/hw/interrupts.h
135 ui.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
136 ui.o: ../../software/include/hw/gpio.h ../../software/include/hal/hdlcd.h
137 ui.o: ../../software/include/hal/time.h renderer.h rpipe.h
138 ui.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
139 ui.o: cpustats.h ui.h
140 wave.o: ../../software/include/base/stdio.h
141 wave.o: ../../software/include/base/stdlib.h
142 wave.o: ../../software/include/base/math.h line.h color.h wave.h renderer.h