make: possibility to generate a floppy image

This commit is contained in:
Mathieu Maret 2018-07-13 14:14:56 +02:00
parent e43e869245
commit 671e19510e
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ cobj=$(csrc:%.c=%.o)
kernel:$(asmobj) $(cobj) linker.ld
$(CXX) $(LDFLAGS) $(cobj) $(asmobj) -o $@ -T linker.ld
fd.img: kernel
dd if=/dev/zero of=$@ bs=512 count=2880
dd if=$< of=$@ conv=notrunc
#https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
exception_handler.o:exception_handler.c
$(CC) $(CPPFLAGS) $(CFLAGS) -mgeneral-regs-only -c $<