3f8290659f3f56efed329d4bf031316f14069025
[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 vera20_tff.o font.o osd.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 logo.raw: logo.png
13         $(MAKE) -C $(MMDIR)/tools
14         $(MMDIR)/tools/makeraw logo.png
15
16 logo.h: logo.raw
17         xxd -i logo.raw logo.h
18
19 %.bin: %.elf
20         $(MAKE) -C $(MMDIR)/tools
21         $(OBJCOPY) $(SEGMENTS) -O binary $< $@
22         chmod -x $@
23         $(MMDIR)/tools/crc32 $@
24
25 boot.elf: linker.ld $(OBJECTS)
26         $(MAKE) -C $(MMDIR)/software/libbase
27         $(MAKE) -C $(MMDIR)/software/libmath
28         $(MAKE) -C $(MMDIR)/software/libhal
29         $(MAKE) -C $(MMDIR)/software/libfpvm
30         $(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
31         chmod -x $@
32
33 .PHONY: clean depend boot.elf
34
35 depend: bandfilters.h logo.h
36         makedepend -Y -- $(CFLAGS) -- *.c
37
38 clean:
39         rm -f $(OBJECTS) bandfilters.h logo.raw logo.h boot.elf boot.bin .*~ *~ Makefile.bak
40
41 # DO NOT DELETE
42
43 analyzer.o: ../../software/include/base/stdio.h
44 analyzer.o: ../../software/include/base/stdlib.h analyzer.h bandfilters.h
45 apipe.o: ../../software/include/base/stdio.h
46 apipe.o: ../../software/include/base/stdlib.h
47 apipe.o: ../../software/include/base/board.h ../../software/include/hal/brd.h
48 apipe.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
49 apipe.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
50 apipe.o: ../../software/include/hw/pfpu.h ../../software/include/hal/time.h
51 apipe.o: analyzer.h eval.h ../../software/include/hw/tmu.h cpustats.h rpipe.h
52 apipe.o: ../../software/include/hal/tmu.h apipe.h
53 cpustats.o: ../../software/include/base/stdio.h
54 cpustats.o: ../../software/include/base/stdlib.h
55 cpustats.o: ../../software/include/base/irq.h
56 cpustats.o: ../../software/include/hal/time.h cpustats.h
57 eval.o: ../../software/include/base/stdio.h
58 eval.o: ../../software/include/base/stdlib.h
59 eval.o: ../../software/include/base/string.h ../../software/include/hw/pfpu.h
60 eval.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
61 eval.o: ../../software/include/hal/pfpu.h ../../software/include/fpvm/fpvm.h
62 eval.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/gfpus.h
63 eval.o: ../../software/include/fpvm/pfpu.h eval.h renderer.h
64 font.o: color.h font.h
65 isr.o: ../../software/include/hw/interrupts.h
66 isr.o: ../../software/include/base/irq.h ../../software/include/base/uart.h
67 isr.o: ../../software/include/hal/time.h ../../software/include/hal/snd.h
68 isr.o: ../../software/include/hw/ac97.h ../../software/include/hw/common.h
69 isr.o: ../../software/include/hal/pfpu.h ../../software/include/hw/pfpu.h
70 isr.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
71 isr.o: cpustats.h
72 line.o: ../../software/include/base/stdlib.h
73 line.o: ../../software/include/base/math.h color.h line.h
74 main.o: ../../software/include/base/stdio.h
75 main.o: ../../software/include/base/stdlib.h
76 main.o: ../../software/include/base/console.h
77 main.o: ../../software/include/base/uart.h
78 main.o: ../../software/include/base/system.h
79 main.o: ../../software/include/base/irq.h ../../software/include/base/board.h
80 main.o: ../../software/include/base/version.h
81 main.o: ../../software/include/hal/brd.h ../../software/include/hal/mem.h
82 main.o: ../../software/include/hal/time.h ../../software/include/hal/vga.h
83 main.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
84 main.o: ../../software/include/hw/common.h ../../software/include/hal/pfpu.h
85 main.o: ../../software/include/hw/pfpu.h ../../software/include/hal/tmu.h
86 main.o: ../../software/include/hw/tmu.h apipe.h rpipe.h renderer.h cpustats.h
87 main.o: memstats.h osd.h shell.h
88 memstats.o: ../../software/include/base/board.h
89 memstats.o: ../../software/include/hal/brd.h
90 memstats.o: ../../software/include/hw/fmlmeter.h
91 memstats.o: ../../software/include/hw/common.h
92 osd.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
93 osd.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
94 osd.o: ../../software/include/hw/sysctl.h ../../software/include/hw/gpio.h
95 osd.o: ../../software/include/base/math.h
96 osd.o: ../../software/include/base/system.h
97 osd.o: ../../software/include/base/string.h
98 osd.o: ../../software/include/base/stdlib.h
99 osd.o: ../../software/include/base/fatfs.h
100 osd.o: ../../software/include/base/blockdev.h font.h logo.h renderer.h
101 osd.o: ../../software/include/base/version.h osd.h
102 renderer.o: ../../software/include/base/stdio.h
103 renderer.o: ../../software/include/base/stdlib.h
104 renderer.o: ../../software/include/base/string.h
105 renderer.o: ../../software/include/base/math.h
106 renderer.o: ../../software/include/base/system.h
107 renderer.o: ../../software/include/hal/pfpu.h
108 renderer.o: ../../software/include/hw/pfpu.h
109 renderer.o: ../../software/include/hw/common.h
110 renderer.o: ../../software/include/hal/vga.h eval.h
111 renderer.o: ../../software/include/hw/tmu.h apipe.h renderer.h
112 rpipe.o: ../../software/include/base/stdio.h
113 rpipe.o: ../../software/include/base/stdlib.h
114 rpipe.o: ../../software/include/base/irq.h
115 rpipe.o: ../../software/include/base/system.h
116 rpipe.o: ../../software/include/base/math.h
117 rpipe.o: ../../software/include/hw/interrupts.h
118 rpipe.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
119 rpipe.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
120 rpipe.o: renderer.h wave.h cpustats.h color.h line.h osd.h rpipe.h
121 shell.o: ../../software/include/base/stdio.h
122 shell.o: ../../software/include/base/stdlib.h
123 shell.o: ../../software/include/base/string.h
124 shell.o: ../../software/include/base/console.h
125 shell.o: ../../software/include/base/uart.h
126 shell.o: ../../software/include/base/blockdev.h
127 shell.o: ../../software/include/base/fatfs.h
128 shell.o: ../../software/include/base/system.h
129 shell.o: ../../software/include/base/math.h ../../software/include/base/irq.h
130 shell.o: ../../software/include/base/board.h ../../software/include/hw/pfpu.h
131 shell.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
132 shell.o: ../../software/include/hw/sysctl.h ../../software/include/hw/gpio.h
133 shell.o: ../../software/include/hw/interrupts.h
134 shell.o: ../../software/include/hw/minimac.h ../../software/include/hal/vga.h
135 shell.o: ../../software/include/hal/snd.h ../../software/include/hw/ac97.h
136 shell.o: ../../software/include/hal/tmu.h ../../software/include/hal/time.h
137 shell.o: ../../software/include/hal/brd.h line.h wave.h rpipe.h cpustats.h
138 shell.o: memstats.h shell.h renderer.h
139 tick.o: ../../software/include/hal/time.h rpipe.h
140 tick.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
141 tick.o: ../../software/include/hw/common.h cpustats.h memstats.h
142 wave.o: ../../software/include/base/stdio.h
143 wave.o: ../../software/include/base/stdlib.h
144 wave.o: ../../software/include/base/math.h line.h color.h wave.h renderer.h