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 BOOTLIB_SOURCE
15 lib/firmware/efi/firmware.c
26 lib/platform/display.c)
28 if(ARCH STREQUAL "i386")
29 list(APPEND BOOTLIB_ASM_SOURCE
30 #lib/arch/i386/foo.asm
32 list(APPEND BOOTLIB_SOURCE
36 elseif(ARCH STREQUAL "amd64")
37 list(APPEND BOOTLIB_ASM_SOURCE
38 #lib/arch/amd64/foo.asm
40 list(APPEND BOOTLIB_SOURCE
47 add_asm_files(bootlib_asm ${BOOTLIB_ASM_SOURCE})
48 add_library(bootlib ${BOOTLIB_SOURCE} ${bootlib_asm})
49 add_pch(bootlib app/bootmgr/bootmgr.h BOOTLIB_SOURCE)
50 add_dependencies(bootlib bugcodes xdk)
52 list(APPEND BOOTMGR_BASE_SOURCE
55 app/bootmgr/rtlcompat.c
58 add_executable(bootmgfw ${BOOTMGR_BASE_SOURCE})
59 set_target_properties(bootmgfw PROPERTIES SUFFIX ".efi")
62 add_target_link_flags(bootmgfw "/ignore:4078 /ignore:4254 /DRIVER /FIXED")
64 add_target_link_flags(bootmgfw "-Wl,--strip-all,--exclude-all-symbols")
67 set_image_base(bootmgfw 0x10000)
70 set_subsystem(bootmgfw EFI_APPLICATION)
72 set_subsystem(bootmgfw 10)
75 set_entrypoint(bootmgfw EfiEntry)
77 target_link_libraries(bootmgfw bootlib cportlib cmlib rtl libcntpr)
80 target_link_libraries(bootmgfw gcc_ssp)
81 elseif(RUNTIME_CHECKS)
82 target_link_libraries(bootmgfw runtmchk)
85 add_dependencies(bootmgfw asm bugcodes)
87 add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION efi/boot NO_CAB FOR bootcd regtest NAME_ON_CD bootia32.efi)