aboutsummaryrefslogtreecommitdiff
path: root/kernel/CMakeLists.txt
blob: 02e517ce0ab80dae75ee99123c85593cd484af98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
add_executable("kernel"
    # Platform-independent KAPI implementation
    "kapi/cio.cpp"
    "kapi/memory.cpp"
    "kapi/system.cpp"

    # KSTD OS Implementation
    "kstd/os.cpp"
    "kstd/print.cpp"

    # Kernel Implementation
    "src/main.cpp"
    "src/memory/bitmap_allocator.cpp"
    "src/memory/block_list_allocator.cpp"
    "src/memory/operators.cpp"
    "src/memory.cpp"
)

target_include_directories("kernel" PRIVATE
    "include"
)

target_link_libraries("kernel" PRIVATE
    "os::arch"
    "os::kapi"
)

target_link_options("kernel" PRIVATE
    "-T${KERNEL_LINKER_SCRIPT}"
    "-no-pie"
    "-nostdlib"
)

set_property(TARGET "kernel"
    APPEND
    PROPERTY LINK_DEPENDS
    "${KERNEL_LINKER_SCRIPT}"
)

target_disassemble("kernel")
target_extract_debug_symbols("kernel")
target_strip("kernel")

target_generate_bootable_iso("kernel")