diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 22:26:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 22:27:09 +0100 |
| commit | eba8b7ddd0a455d9e49f32dcae712c5612c0093c (patch) | |
| tree | 749a3d34546d055507a920bce4ab10e8a9945719 /Private/makefile | |
| parent | dd192787a70a973f2474720aea49af3f6ddabb7a (diff) | |
Kernel: Major repository refactor.
Rework the repo into Private and Public modules.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/makefile')
| -rw-r--r-- | Private/makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Private/makefile b/Private/makefile new file mode 100644 index 00000000..558811a2 --- /dev/null +++ b/Private/makefile @@ -0,0 +1,35 @@ +CC = x86_64-elf-gcc +LD = x86_64-elf-ld +CCFLAGS = -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__hCore__ -I./ -I$(HOME)/ +ASM = nasm +ASMFLAGS = -f elf64 + +# This file is the kernel, responsible of task management, memory, drivers and more. +KERNEL = hKernel.elf + +# The kernel entrypoint +SCRIPT = --script=Linker/AMD64.ld + +# we want a flat binary +FMT = elf64 + +.PHONY: kernel-build +kernel-build: + $(CC) $(CCFLAGS) Source/*.cxx HALKit/AMD64/PCI/*.cpp Source/Network/*.cpp\ + Source/Storage/*.cxx HALKit/AMD64/*.cxx HALKit/AMD64/*.cpp HALKit/AMD64/*.s + $(ASM) -f elf64 HALKit/AMD64/DebugManager.asm + $(ASM) -f elf64 HALKit/AMD64/SMPCoreManager.asm + mv *.o HALKit/AMD64/*.o Obj/ + +.PHONY: kernel-link +kernel-link: + $(LD) $(SCRIPT) Obj/*.o -o $(KERNEL) + cp $(KERNEL) Root/System + +.PHONY: all +all: kernel-build kernel-link + @echo "[hKernel] JOB DONE." + +.PHONY: kernel-clean +kernel-clean: + rm -f Obj/*.o $(KERNEL) |
