implemented chainloading from hd
[bootboot] / Makefile
1 bin = bootboot
2 # build flat binary (no headers)
3 ASFLAGS = -f bin
4 $(bin): bb.asm
5         nasm $(ASFLAGS) -o $@ $<
6
7 floppy.img: $(bin)
8         dd if=/dev/zero of=$@ bs=1024 count=1440
9         dd if=$< of=$@ bs=512 conv=notrunc
10
11 .PHONY: disasm
12 disasm: $(bin)
13         ndisasm -b16 -o 0x7c00 $< > dis
14
15 .PHONY: clean
16 clean:
17         rm -f $(bin)
18
19 # floppy disk A (fda)
20 .PHONY: run
21 run: floppy.img
22         qemu-system-i386 -fda $<
23
24 .PHONY: debug
25 debug: floppy.img
26         qemu-system-i386 -S -s -fda $<