X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=5c193432e5df71a4930cf91873efeb16c2311e24;hb=de48157cb811c927d7a2af1be1ed15b162a320a2;hp=8e95cce2c17dfb456353af8fbf64b358d5432ed7;hpb=be7535b3af9d7ecc5581a7b3d325f5caec87b24f;p=eightysix diff --git a/Makefile b/Makefile index 8e95cce..5c19343 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,17 @@ -bin = boot.img +disk_numsec = 720 +#disk_numsec = 2880 + +bin = bootldr +img = bootldr.img CC = ia16-elf-gcc LD = ia16-elf-ld -CFLAGS = -march=i8088 -mtune=i8088 +CFLAGS = -march=i8088 -mtune=i8088 -DFLOPPY360 + +$(img): $(bin) + dd if=/dev/zero of=$@ bs=512 count=$(disk_numsec) + dd if=$< of=$@ bs=512 conv=notrunc $(bin): boot/boot.o boot/boot2.o boot/main.o $(LD) -T boot.ld -Map boot.map -o $@ $^ @@ -17,12 +25,12 @@ clean: .PHONY: run -run: $(bin) - qemu-system-i386 -fda $(bin) -serial file:serial.log +run: $(img) + qemu-system-i386 -fda $(img) -serial file:serial.log .PHONY: debug -debug: $(bin) - qemu-system-i386 -fda $(bin) -serial file:serial.log -s -S +debug: $(img) + qemu-system-i386 -fda $(img) -serial file:serial.log -s -S .PHONY: disasm disasm: $(bin)