jankos/makefile
2019-01-15 15:31:14 -08:00

35 lines
739 B
Makefile

ASM=nasm
CC=gcc
LINK=ld
ISO=genisoimage
EMU=bochs
emuconfig='bochsrc.conf'
all: loader link iso
echo 'yeeting'
# 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
run:
$(EMU) -f $(emuconfig) -q
# 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