diff options
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 |