0bac632d48e4ce284ca8631d3042a242786f9659
[eightysix] / Makefile
1 bin = boot.img
2
3 CC = ia16-elf-gcc
4 LD = ia16-elf-ld
5
6 CFLAGS = -march=i8088 -mtune=i8088
7
8 $(bin): boot/boot.o boot/boot2.o boot/main.o
9         $(LD) -T boot.ld -Map boot.map -o $@ $^
10
11 %.o: %.asm
12         nasm -o $@ -f elf $<
13
14 .PHONY: clean
15 clean:
16         rm -f boot/*.o $(bin)
17
18
19 .PHONY: run
20 run: $(bin)
21         qemu-system-i386 -fda $(bin) -serial file:serial.log
22
23 .PHONY: debug
24 debug: $(bin)
25         qemu-system-i386 -fda $(bin) -serial file:serial.log -s -S
26
27 .PHONY: disasm
28 disasm: $(bin)
29         ndisasm -o 0x7c00 $< >dis