diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index 7f3493c0c4a..eab985b94e5 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -68,14 +68,6 @@ list(APPEND FREELDR_BOOTMGR_SOURCE ui/ui.c ui/video.c) -list(APPEND FREELDR_NTLDR_SOURCE - ${REACTOS_SOURCE_DIR}/ntoskrnl/config/cmboot.c - ntldr/conversion.c - ntldr/registry.c - ntldr/winldr.c - ntldr/wlmemory.c - ntldr/wlregistry.c) - if(ARCH STREQUAL "i386") list(APPEND FREELDR_COMMON_ASM_SOURCE @@ -85,10 +77,6 @@ if(ARCH STREQUAL "i386") list(APPEND FREELDR_ARC_SOURCE arch/i386/i386bug.c) - list(APPEND FREELDR_NTLDR_SOURCE - ntldr/arch/i386/winldr.c - ntldr/headless.c) - elseif(ARCH STREQUAL "amd64") list(APPEND FREELDR_COMMON_ASM_SOURCE arch/amd64/misc.S) @@ -98,13 +86,8 @@ elseif(ARCH STREQUAL "amd64") arch/i386/i386bug.c arch/i386/ntoskrnl.c) - list(APPEND FREELDR_NTLDR_SOURCE - ntldr/arch/amd64/winldr.c) - elseif(ARCH STREQUAL "arm") - list(APPEND FREELDR_NTLDR_SOURCE - ntldr/arch/arm/winldr.c) - + #TBD else() #TBD endif() diff --git a/boot/freeldr/freeldr/pcat.cmake b/boot/freeldr/freeldr/pcat.cmake index 2b973a2af2a..7d4331d2855 100644 --- a/boot/freeldr/freeldr/pcat.cmake +++ b/boot/freeldr/freeldr/pcat.cmake @@ -220,12 +220,11 @@ set_image_base(freeldr_pe 0x10000) set_subsystem(freeldr_pe native) set_entrypoint(freeldr_pe RealEntryPoint) +target_link_libraries(freeldr_pe freeldr_common cportlib libcntpr blrtl) if(ARCH STREQUAL "i386") target_link_libraries(freeldr_pe mini_hal) endif() -target_link_libraries(freeldr_pe freeldr_common cportlib libcntpr blrtl) - # dynamic analysis switches if(STACK_PROTECTOR) target_link_libraries(freeldr_pe gcc_ssp_nt) diff --git a/boot/freeldr/freeldr/rosload.cmake b/boot/freeldr/freeldr/rosload.cmake index 1a1e8ec8164..1ab4e5ee405 100644 --- a/boot/freeldr/freeldr/rosload.cmake +++ b/boot/freeldr/freeldr/rosload.cmake @@ -78,11 +78,11 @@ set_image_base(rosload 0x10000) # 0x200000 set_subsystem(rosload native) set_entrypoint(rosload RunLoader) +target_link_libraries(rosload blcmlib blrtl libcntpr) if(ARCH STREQUAL "i386") target_link_libraries(rosload mini_hal) endif() -target_link_libraries(rosload blcmlib blrtl libcntpr) add_importlibs(rosload freeldr) # dynamic analysis switches diff --git a/boot/freeldr/freeldr/uefi.cmake b/boot/freeldr/freeldr/uefi.cmake index 50f293bacd7..b02c694c993 100644 --- a/boot/freeldr/freeldr/uefi.cmake +++ b/boot/freeldr/freeldr/uefi.cmake @@ -53,6 +53,30 @@ list(APPEND UEFILDR_BOOTMGR_SOURCE add_asm_files(uefifreeldr_common_asm ${FREELDR_COMMON_ASM_SOURCE} ${UEFILDR_COMMON_ASM_SOURCE}) +list(APPEND FREELDR_NTLDR_SOURCE + ${REACTOS_SOURCE_DIR}/ntoskrnl/config/cmboot.c + ntldr/conversion.c + ntldr/inffile.c + ntldr/registry.c + ntldr/setupldr.c + ntldr/winldr.c + ntldr/wlmemory.c + ntldr/wlregistry.c) + +if(ARCH STREQUAL "i386") + list(APPEND FREELDR_NTLDR_SOURCE + ntldr/arch/i386/winldr.c + ntldr/headless.c) +elseif(ARCH STREQUAL "amd64") + list(APPEND FREELDR_NTLDR_SOURCE + ntldr/arch/amd64/winldr.c) +elseif(ARCH STREQUAL "arm") + list(APPEND FREELDR_NTLDR_SOURCE + ntldr/arch/arm/winldr.c) +else() + #TBD +endif() + add_library(uefifreeldr_common ${uefifreeldr_common_asm} ${UEFILDR_ARC_SOURCE} @@ -88,8 +112,6 @@ list(APPEND UEFILDR_BASE_SOURCE include/arch/uefi/uefildr.h arch/uefi/uefildr.c bootmgr.c - ntldr/setupldr.c - ntldr/inffile.c ${FREELDR_BASE_SOURCE}) if(ARCH STREQUAL "i386") @@ -132,12 +154,11 @@ endif() set_entrypoint(uefildr EfiEntry) +target_link_libraries(uefildr uefifreeldr_common cportlib blcmlib blrtl libcntpr) if(ARCH STREQUAL "i386") target_link_libraries(uefildr mini_hal) endif() -target_link_libraries(uefildr uefifreeldr_common cportlib blcmlib blrtl libcntpr) - # dynamic analysis switches if(STACK_PROTECTOR) target_link_libraries(uefildr gcc_ssp_nt)