-
Notifications
You must be signed in to change notification settings - Fork 41
/
Makefile
73 lines (63 loc) · 3.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
MMDIR=../..
include $(MMDIR)/software/include.mak
OBJECTS=crt0.o isr.o main.o unlzma.o boot.o boot-helper.o splash.o
SEGMENTS=-j .text -j .data -j .rodata
all: bios.bin bios-rescue.bin
%.bin: %.elf
$(MAKE) -C $(MMDIR)/tools
$(OBJCOPY) $(SEGMENTS) -O binary $< $@
chmod -x $@
$(MMDIR)/tools/mkmmimg $@ write
# make sure the linker*.ld at the first of depends
bios.elf: linker.ld $(OBJECTS)
bios-rescue.elf: linker-rescue.ld $(OBJECTS)
%.elf:
$(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) -L$(MMDIR)/software/libhpdmc -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libhal -L$(MMDIR)/software/libnet --start-group -lhpdmc -lbase-light -lhal -lnet --end-group
chmod -x $@
.PHONY: clean depend
depend:
makedepend -Y -- $(CFLAGS) -- *.c
clean:
rm -f *.o bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~ Makefile.bak
# DO NOT DELETE
boot.o: ../../software/include/base/stdio.h
boot.o: ../../software/include/base/stdlib.h
boot.o: ../../software/include/base/console.h
boot.o: ../../software/include/base/uart.h
boot.o: ../../software/include/base/system.h
boot.o: ../../software/include/base/board.h ../../software/include/base/crc.h
boot.o: ../../tools/sfl.h ../../software/include/base/blockdev.h
boot.o: ../../software/include/base/fatfs.h
boot.o: ../../software/include/base/string.h
boot.o: ../../software/include/base/irq.h
boot.o: ../../software/include/net/microudp.h
boot.o: ../../software/include/net/tftp.h ../../software/include/hal/vga.h
boot.o: ../../software/include/hal/usb.h ../../software/include/hw/hpdmc.h
boot.o: ../../software/include/hw/common.h ../../software/include/hw/flash.h
boot.o: unlzma.h boot.h
isr.o: ../../software/include/hw/interrupts.h
isr.o: ../../software/include/base/irq.h ../../software/include/base/uart.h
isr.o: ../../software/include/hal/usb.h ../../software/include/hal/tmu.h
isr.o: ../../software/include/hw/tmu.h ../../software/include/hw/common.h
main.o: ../../software/include/base/stdio.h
main.o: ../../software/include/base/stdlib.h
main.o: ../../software/include/base/console.h
main.o: ../../software/include/base/string.h
main.o: ../../software/include/base/uart.h
main.o: ../../software/include/base/blockdev.h
main.o: ../../software/include/base/fatfs.h ../../software/include/base/crc.h
main.o: ../../software/include/base/system.h
main.o: ../../software/include/base/board.h ../../software/include/base/irq.h
main.o: ../../software/include/base/version.h
main.o: ../../software/include/net/mdio.h ../../software/include/hw/fmlbrg.h
main.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
main.o: ../../software/include/hw/gpio.h ../../software/include/hw/flash.h
main.o: ../../software/include/hw/minimac.h ../../software/include/hal/vga.h
main.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
main.o: ../../software/include/hal/brd.h ../../software/include/hal/usb.h
main.o: ../../software/include/hal/ukb.h boot.h splash.h
splash.o: ../../software/include/base/stdio.h
splash.o: ../../software/include/base/stdlib.h
splash.o: ../../software/include/hal/vga.h ../../software/include/hw/flash.h
splash.o: splash.h
unlzma.o: unlzma.h