From 79bedd9013816f067d29ed4f89a98b134df1b3e5 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sun, 1 Mar 2020 17:08:25 +0000 Subject: [PATCH] Fixes for makefile --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d1b30a8..ac9bf45 100644 --- a/Makefile +++ b/Makefile @@ -31,32 +31,34 @@ endif default: fdimage.img # Host utils -utils/%: src/utils/%.c +utils/%: %.c mkdir -p utils $(CC) -o $@ $< -cp437.bin: src/cp437.bmp utils/bmp2font +cp437.bin: cp437.bmp utils/bmp2font utils/bmp2font $< $@ -# BIOS option roms -rom/%.rom: rom/%.asm utils/fix-rom - $(NASM) $(NASM_ARGS) -o $@ $< && utils/fix-rom $@ +vga11.com: cp437.bin # COM programs %.com: %.asm - $(NASM) $(NASM_ARGS) -DCOM -DBASE=0x0100 -o $@ $< + $(NASM) $(NASM_ARGS) -DBASE=0x0100 -DCOM -o $@ $< # Bootloaders, first sector on partition %.bs: %.asm - $(NASM) $(NASM_ARGS) -DBOOT -DBASE=0x7C00 -o $@ $< + $(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DBOOT -o $@ $< : check boot signature test "$$(echo $$(xxd -p -l 2 -s 510 pxe.bs))" == 55aa # Network bootstrap protocol as used for PXE %.0: %.asm - $(NASM) $(NASM_ARGS) -DNBP -DBASE=0x7C00 -o $@ $< + $(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DNBP -o $@ $< -fdimage.img: boot/fat.bs $(BDOSIMG) $(BIOSIMG) $(DISTFILES) +# BIOS option roms +%.rom: %.asm utils/fix-rom + $(NASM) $(NASM_ARGS) -DBASE=0x0000 -DROM -o $@ $< && utils/fix-rom $@ + +fdimage.img: fat.bs $(BDOSIMG) $(BIOSIMG) $(DISTFILES) mformat -R 9 -C -i $@ -f $(FLOPPY) -B boot/fat.bs :: dd if=$(BDOSIMG) bs=512 seek=1 count=4 conv=notrunc of=$@ dd if=$(BIOSIMG) bs=512 seek=5 count=4 conv=notrunc of=$@ @@ -67,6 +69,7 @@ hdimage.img: boot/mbr.bs fdimage.img clean: rm -f *.com *.bs *.0 *.lst *.img *.bin *.rom + rm -rf utils qemu-floppy: fdimage.img $(ROMS) $(QEMU) $(QEMU_ARGS) -boot a -fda fdimage.img