aboutsummaryrefslogtreecommitdiff
path: root/kernel/CMakeLists.txt
blob: 398022ceda57bfa17fa1307a21a7c1af70d1877b (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
add_executable("kernel"
    # Platform-independent KAPI implementation
    "kapi/boot_modules.cpp"
    "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"
    "src/devices/device.cpp"
    "src/devices/block_device.cpp"
    "src/devices/storage/storage_controller.cpp"
    "src/devices/storage/storage_management.cpp"
    "src/devices/storage/ram_disk/ram_disk_controller.cpp"
    "src/devices/storage/ram_disk/ram_disk_device.cpp"
    "src/filesystem/ext2/ext2_filesystem.cpp"
    "src/filesystem/custody.cpp"
    "src/filesystem/device_file.cpp"
    "src/filesystem/file_descriptor_table.cpp"
    "src/filesystem/filesystem.cpp"
    "src/filesystem/inode_file.cpp"
    "src/filesystem/inode.cpp"
    "src/filesystem/mount.cpp"
    "src/filesystem/open_file_description.cpp"
    "src/filesystem/vfs.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")