mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-11 13:35:03 -04:00
Create a sub makefile for the micro_kernel
This commit is contained in:
parent
e8e1695b29
commit
4ca5617bfc
11
Makefile
11
Makefile
@ -3,15 +3,12 @@ default: thor.flp
|
||||
bootloader.bin: force_look
|
||||
cd bootloader; $(MAKE)
|
||||
|
||||
micro_kernel.bin: force_look
|
||||
cd micro_kernel; $(MAKE)
|
||||
|
||||
force_look:
|
||||
true
|
||||
|
||||
MICRO_KERNEL_SRC=$(wildcard micro_kernel/*.asm)
|
||||
MICRO_KERNEL_UTILS_SRC=$(wildcard micro_kernel/utils/*.asm)
|
||||
|
||||
micro_kernel.bin: $(MICRO_KERNEL_SRC) $(MICRO_KERNEL_UTILS_SRC)
|
||||
nasm -w+all -f bin -o micro_kernel.bin micro_kernel/micro_kernel.asm
|
||||
|
||||
KERNEL_FLAGS=-masm=intel -Ikernel/include/ -O1 -std=c++11 -Wall -Wextra -fno-exceptions -fno-rtti -ffreestanding
|
||||
KERNEL_LINK_FLAGS=-std=c++11 -T linker.ld -ffreestanding -O1 -nostdlib
|
||||
|
||||
@ -44,7 +41,7 @@ filler.bin: kernel.bin
|
||||
|
||||
thor.flp: bootloader.bin micro_kernel.bin kernel.bin filler.bin
|
||||
cat bootloader/bootloader.bin > thor.bin
|
||||
cat micro_kernel.bin >> thor.bin
|
||||
cat micro_kernel/micro_kernel.bin >> thor.bin
|
||||
cat kernel.bin >> thor.bin
|
||||
cat filler.bin >> thor.bin
|
||||
dd status=noxfer conv=notrunc if=thor.bin of=thor.flp
|
||||
|
5
micro_kernel/Makefile
Normal file
5
micro_kernel/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
MICRO_KERNEL_SRC=$(wildcard *.asm)
|
||||
MICRO_KERNEL_UTILS_SRC=$(wildcard utils/*.asm)
|
||||
|
||||
micro_kernel.bin: $(MICRO_KERNEL_SRC) $(MICRO_KERNEL_UTILS_SRC)
|
||||
nasm -w+all -f bin -o micro_kernel.bin micro_kernel.asm
|
@ -113,11 +113,11 @@ lm_start:
|
||||
|
||||
; Includes
|
||||
|
||||
%include "micro_kernel/utils/macros.asm"
|
||||
%include "micro_kernel/utils/console.asm"
|
||||
%include "utils/macros.asm"
|
||||
%include "utils/console.asm"
|
||||
|
||||
%include "micro_kernel/interrupts.asm"
|
||||
%include "micro_kernel/shell.asm"
|
||||
%include "interrupts.asm"
|
||||
%include "shell.asm"
|
||||
|
||||
; Global Descriptors Table
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
%include "micro_kernel/utils/utils.asm"
|
||||
%include "micro_kernel/utils/keyboard.asm"
|
||||
%include "utils/utils.asm"
|
||||
%include "utils/keyboard.asm"
|
||||
|
||||
%include "micro_kernel/commands.asm"
|
||||
%include "commands.asm"
|
||||
|
||||
; Entry point of the shell, this function never returns
|
||||
shell_start:
|
||||
|
Loading…
x
Reference in New Issue
Block a user