diff --git a/xtldr/modules/CMakeLists.txt b/xtldr/modules/CMakeLists.txt index 375c1d7..e329643 100644 --- a/xtldr/modules/CMakeLists.txt +++ b/xtldr/modules/CMakeLists.txt @@ -1,5 +1,6 @@ add_subdirectory(beep) add_subdirectory(dummy) +add_subdirectory(elf) add_subdirectory(fb_o) add_subdirectory(pecoff_o) add_subdirectory(xtos_o) diff --git a/xtldr/modules/elf/CMakeLists.txt b/xtldr/modules/elf/CMakeLists.txt new file mode 100644 index 0000000..b705b69 --- /dev/null +++ b/xtldr/modules/elf/CMakeLists.txt @@ -0,0 +1,26 @@ +# 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) diff --git a/xtldr/modules/elf_o/elf.c b/xtldr/modules/elf/elf.c similarity index 99% rename from xtldr/modules/elf_o/elf.c rename to xtldr/modules/elf/elf.c index bf5282e..dc63e3c 100644 --- a/xtldr/modules/elf_o/elf.c +++ b/xtldr/modules/elf/elf.c @@ -1,7 +1,7 @@ /** * PROJECT: ExectOS * COPYRIGHT: See COPYING.md in the top level directory - * FILE: xtldr/modules/elf_o/elf.c + * FILE: xtldr/modules/elf/elf.c * DESCRIPTION: ELF executable file format support module * DEVELOPERS: Jozef Nagy */ diff --git a/xtldr/modules/elf_o/includes/elf.h b/xtldr/modules/elf/includes/elf.h similarity index 95% rename from xtldr/modules/elf_o/includes/elf.h rename to xtldr/modules/elf/includes/elf.h index c234f0e..56d6ee4 100644 --- a/xtldr/modules/elf_o/includes/elf.h +++ b/xtldr/modules/elf/includes/elf.h @@ -1,7 +1,7 @@ /** * PROJECT: ExectOS * COPYRIGHT: See COPYING.md in the top level directory - * FILE: xtldr/modules/elf_o/includes/elf.h + * FILE: xtldr/modules/elf/includes/elf.h * DESCRIPTION: ELF executable file format support header * DEVELOPERS: Jozef Nagy */ diff --git a/xtldr/modules/elf_o/CMakeLists.txt b/xtldr/modules/elf_o/CMakeLists.txt deleted file mode 100644 index 2cf25fb..0000000 --- a/xtldr/modules/elf_o/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# XT Boot Loader -PROJECT(XTLDR_ELF_O) - -# Specify include directories -include_directories( - ${EXECTOS_SOURCE_DIR}/sdk/xtdk - ${XTLDR_ELF_O_SOURCE_DIR}/includes) - -# Specify list of source code files -list(APPEND XTLDR_ELF_O_SOURCE - ${XTLDR_ELF_O_SOURCE_DIR}/elf.c) - -# Link bootloader executable -add_executable(elf_o ${XTLDR_ELF_O_SOURCE}) - -# Add linker libraries -target_link_libraries(elf_o libxtos libxtldr) - -# Set proper binary name and install target -set_target_properties(elf_o PROPERTIES SUFFIX .efi) -set_install_target(elf_o efi/boot/xtldr/modules) - -# Set module entrypoint and subsystem -set_entrypoint(elf_o "XtLdrModuleMain") -set_linker_map(elf_o TRUE) -set_subsystem(elf_o efi_boot_service_driver)