Files
ksOS/Bootloader/CMakeLists.txt
T
karina a331d395d5 refactor: drop posix-uefi from bootloader
Replace the vendored POSIX-UEFI runtime with a small local EFI entry and header so the bootloader depends only on the UEFI interfaces it actually uses.

Made-with: Cursor
2026-04-20 23:03:36 +04:00

33 lines
781 B
CMake

cmake_minimum_required(VERSION 3.20)
project(ksOS_bootloader LANGUAGES C ASM)
set(UEFI_COMPILE_OPTIONS
-std=c23
-target aarch64-unknown-windows-msvc
-Wall -Wextra
-fno-builtin
)
add_executable(BOOTAA64
Source/uefi/efi_entry.c
Source/main.c
)
target_compile_options(BOOTAA64 PRIVATE ${UEFI_COMPILE_OPTIONS})
target_include_directories(BOOTAA64 PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Source
${CMAKE_CURRENT_SOURCE_DIR}/Source/uefi
)
target_link_options(BOOTAA64 PRIVATE
-fuse-ld=lld
-target aarch64-unknown-windows-msvc
-nostdlib
-Wl,-subsystem:efi_application
-Wl,-entry:efi_main
)
set_target_properties(BOOTAA64 PROPERTIES
SUFFIX ".EFI"
OUTPUT_NAME "BOOTAA64"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/efi_bin"
)