diff options
author | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2015-11-02 11:15:48 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy.zurcher@heraeus.com> | 2015-11-02 11:15:48 +0100 |
commit | d968266a3be79c449f62fdf6f19b8f8b5344eece (patch) | |
tree | 75c3596106e4d7b92a7223adb22f4f6cb5f5f928 /kernel/makefile | |
download | os_skeleton-d968266a3be79c449f62fdf6f19b8f8b5344eece.zip os_skeleton-d968266a3be79c449f62fdf6f19b8f8b5344eece.tar.gz |
Initial commit
Diffstat (limited to 'kernel/makefile')
-rw-r--r-- | kernel/makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/makefile b/kernel/makefile new file mode 100644 index 0000000..0173172 --- /dev/null +++ b/kernel/makefile @@ -0,0 +1,24 @@ +all: run + +run : ld + +ld: kernel.o bootloader.o gdt.o gdt_asm.o + ld -Tkernel.ld -melf_i386 gdt_asm.o bootloader.o kernel.o gdt.o -o kernel.elf + +kernel.o: kernel.c kernel_asm.o + gcc -DTEST -std=gnu99 -m32 -fno-builtin -ffreestanding -Wall -Wextra -c kernel.c + +kernel_asm.o: kernel_asm.s + nasm -f elf32 $< + +bootloader.o: bootloader.s + nasm -f elf32 bootloader.s + +gdt.o: gdt.c gdt.h + gcc -std=gnu99 -m32 -fno-builtin -ffreestanding -Wall -Wextra -c gdt.c + +gdt_asm.o: gdt_asm.s + nasm -f elf32 $< + +clean: + rm -f *.o
\ No newline at end of file |