diff --git a/makefile b/makefile new file mode 100644 index 0000000..2efc6ff --- /dev/null +++ b/makefile @@ -0,0 +1,27 @@ +ASM=nasm +CC=gcc +LINK=ld +ISO=genisoimage + +# build our loader +loader: loader.asm + # loading the kernel form loader.asm + # creates loader.o + $(ASM) -f elf32 loader.asm + +# link the kernel to our loader +link: loader.o + $(LINK) -T link.ld -melf_i386 loader.o -o kernel.elf + +# build the iso file into our target directory +iso: + $(ISO) -R \ + -b boot/grub/stage2_eltorito \ + -no-emul-boot \ + -boot-load-size 4 \ + -A os \ + -input-charset utf8 \ + -quiet \ + -boot-info-table \ + -o os.iso \ + iso