diff options
| author | Lukas Oesch <lukas.oesch@ost.ch> | 2026-06-10 10:40:46 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukas.oesch@ost.ch> | 2026-06-10 10:40:46 +0200 |
| commit | 33abd5cf264cb9e34121082105b0bc17b3cf7a36 (patch) | |
| tree | 36b15d53fea04f4f9d9af817100f7ad013bd9b5c /arch/x86_64/CMakeLists.txt | |
| parent | d01caf1c4aef3c89c68b9d1cc9fe56445f0860b5 (diff) | |
| parent | 7e27130c342b7299a1d2188a7192a7f17b5ac2ad (diff) | |
| download | kernel-33abd5cf264cb9e34121082105b0bc17b3cf7a36.tar.xz kernel-33abd5cf264cb9e34121082105b0bc17b3cf7a36.zip | |
Merge of BA-FS26 branch into develop
See merge request teachos/kernel!49
Diffstat (limited to 'arch/x86_64/CMakeLists.txt')
| -rw-r--r-- | arch/x86_64/CMakeLists.txt | 77 |
1 files changed, 59 insertions, 18 deletions
diff --git a/arch/x86_64/CMakeLists.txt b/arch/x86_64/CMakeLists.txt index 41932c9..20a48f9 100644 --- a/arch/x86_64/CMakeLists.txt +++ b/arch/x86_64/CMakeLists.txt @@ -1,44 +1,69 @@ +#[============================================================================[ +# Library +#]============================================================================] + add_library("x86_64" OBJECT) -add_library("os::arch" ALIAS "x86_64") +add_library("arch::lib" ALIAS "x86_64") target_include_directories("x86_64" PUBLIC - "include" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries("x86_64" PUBLIC - "os::kapi" - "libs::multiboot2" + "kapi::lib" + "multiboot2::lib" ) target_sources("x86_64" PRIVATE - # Platform-dependent KAPI implementation + "kapi/boot_modules.cpp" "kapi/cio.cpp" "kapi/cpu.cpp" + "kapi/devices.cpp" + "kapi/interrupts.cpp" "kapi/memory.cpp" "kapi/system.cpp" +) + +target_sources("x86_64" PRIVATE + # CPU Initialization + "arch/cpu/initialization.cpp" + "arch/cpu/interrupts.cpp" + "arch/cpu/interrupts.S" + + # Bus Initialization + "arch/bus/isa.cpp" # Low-level bootstrap - "src/boot/boot32.S" - "src/boot/entry64.s" - "src/boot/initialize_runtime.cpp" - "src/boot/multiboot.s" + "arch/boot/boot32.S" + "arch/boot/entry64.s" + "arch/boot/initialize_runtime.cpp" + "arch/boot/multiboot.s" # Debug interfaces - "src/debug/qemu_output.cpp" + "arch/debug/qemu_output.cpp" + + # Devices + "arch/devices/init.cpp" + "arch/devices/legacy_pit.cpp" + "arch/devices/local_apic.cpp" # Memory management - "src/memory/kernel_mapper.cpp" - "src/memory/higher_half_mapper.cpp" - "src/memory/mmu.cpp" - "src/memory/page_table.cpp" - "src/memory/region_allocator.cpp" + "arch/memory/kernel_mapper.cpp" + "arch/memory/higher_half_mapper.cpp" + "arch/memory/mmu.cpp" + "arch/memory/page_table.cpp" + "arch/memory/region_allocator.cpp" # VGA text mode - "src/vga/text/buffer.cpp" - "src/vga/text/device.cpp" + "arch/vga/text/buffer.cpp" + "arch/vga/text/device.cpp" ) -file(GLOB_RECURSE ARCH_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp") +file(GLOB_RECURSE ARCH_HEADERS + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + CONFIGURE_DEPENDS + "include/**.hpp" +) target_sources("x86_64" PUBLIC FILE_SET HEADERS @@ -46,7 +71,23 @@ target_sources("x86_64" PUBLIC FILES ${ARCH_HEADERS} ) +target_include_directories("x86_64" PUBLIC + "include" +) + +target_link_libraries("x86_64" PUBLIC + "acpi::lib" + "elf::lib" + "kapi::lib" + "kstd::lib" + "multiboot2::lib" +) + set(KERNEL_LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/kernel.ld" PARENT_SCOPE ) + +set_target_properties("x86_64" PROPERTIES + VERIFY_INTERFACE_HEADER_SETS YES +) |
