#makefile for boot #this program TARGET = boot/boot.bin boot/loader.bin #programs,flags,etc ASM = nasm ASMFLAGS = -I boot/include/ #PHONY for boot .PHONY:everything clean all buildimg #default starting position buildimg:everything sudo dd if=boot/boot.bin of=b.img bs=512 count=1 conv=notrunc sudo mount -o loop b.img /mnt/floppy sudo cp -fv boot/loader.bin /mnt/floppy/ sudo umount /mnt/floppy everything:$(TARGET) clean: sudo rm -f $(TARGET) all:everything clean boot/boot.bin:boot/boot.asm sudo $(ASM) $(ASMFLAGS) -o $@ $< boot/loader.bin:boot/loader.asm boot/include/pm.inc boot/include/lib_in_real_mode.inc boot/include/lib_in_protect_mode.inc sudo $(ASM) $(ASMFLAGS) -o $@ $<