27 行
687 B
CMake
27 行
687 B
CMake
# XT Boot Loader
|
|
PROJECT(XTLDR_ELF)
|
|
|
|
# Specify include directories
|
|
include_directories(
|
|
${EXECTOS_SOURCE_DIR}/sdk/xtdk
|
|
${XTLDR_ELF_SOURCE_DIR}/includes)
|
|
|
|
# Specify list of source code files
|
|
list(APPEND XTLDR_ELF_SOURCE
|
|
${XTLDR_ELF_SOURCE_DIR}/elf.c)
|
|
|
|
# Link bootloader executable
|
|
add_executable(elf ${XTLDR_ELF_SOURCE})
|
|
|
|
# Add linker libraries
|
|
target_link_libraries(elf libxtos libxtldr)
|
|
|
|
# Set proper binary name and install target
|
|
set_target_properties(elf PROPERTIES SUFFIX .efi)
|
|
set_install_target(elf efi/boot/xtldr/modules)
|
|
|
|
# Set module entrypoint and subsystem
|
|
set_entrypoint(elf "XtLdrModuleMain")
|
|
set_linker_map(elf TRUE)
|
|
set_subsystem(elf efi_boot_service_driver)
|