2 include_directories(BEFORE include)
3 include_directories(BEFORE include/efi)
4 include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include)
5 include_directories(${REACTOS_SOURCE_DIR}/lib/cmlib)
6 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs)
8 add_definitions(-D_NTHAL_ -D_BLDR_ -D_NTSYSTEM_)
10 list(APPEND BOOTMGR_COMMON_SOURCE
15 if(ARCH STREQUAL "i386")
16 list(APPEND BOOTMGR_COMMON_ASM_SOURCE
17 #lib/arch/i386/foo.asm
19 list(APPEND BOOTMGR_COMMON_SOURCE
22 elseif(ARCH STREQUAL "amd64")
23 list(APPEND BOOTMGR_COMMON_ASM_SOURCE
24 #lib/arch/amd64/foo.asm
26 list(APPEND BOOTMGR_COMMON_SOURCE
33 add_asm_files(bootmgr_common_asm ${BOOTMGR_COMMON_ASM_SOURCE})
34 add_library(bootmgr_common ${BOOTMGR_COMMON_SOURCE} ${bootmgr_common_asm})
35 add_pch(bootmgr_common app/bootmgr/bootmgr.h BOOTMGR_COMMON_SOURCE)
36 #add_dependencies(bootmgr_common bugcodes)
38 list(APPEND BOOTMGR_BASE_SOURCE
43 add_executable(bootmgfw ${BOOTMGR_BASE_SOURCE})
44 set_target_properties(bootmgfw PROPERTIES SUFFIX ".efi")
47 add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /FIXED")
49 add_target_link_flags(bootmgfw "-Wl,--strip-all,--exclude-all-symbols")
52 set_image_base(bootmgfw 0x10000)
55 set_subsystem(bootmgfw EFI_APPLICATION)
57 set_subsystem(bootmgfw 10)
60 set_entrypoint(bootmgfw EfiEntry)
62 target_link_libraries(bootmgfw bootmgr_common cportlib cmlib rtl libcntpr)
64 add_dependencies(bootmgfw asm bugcodes)
66 add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION loader NO_CAB FOR bootcd regtest)