summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..f6d082c
--- /dev/null
+++ b/makefile
@@ -0,0 +1,13 @@
+ASM="/home/jackson/opt/cross/bin/i686-elf-as"
+CC="/home/jackson/opt/cross/bin/i686-elf-gcc"
+
+all: boot.s kernel.c linker.ld
+ $(ASM) boot.s -o boot.o
+ $(CC) -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
+ $(CC) -T linker.ld -o myos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc
+iso: all
+ cp myos.bin isodir/boot/
+ grub-mkrescue -o myos.iso isodir/
+clean:
+ rm *.o *.bin *.iso
+