[BOOTLIB]
[reactos.git] / reactos / boot / environ / CMakeLists.txt
index 3506aab..08dee65 100644 (file)
@@ -7,37 +7,52 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs)
 
 add_definitions(-D_NTHAL_ -D_BLDR_ -D_NTSYSTEM_)
 
-list(APPEND BOOTMGR_COMMON_SOURCE
+list(APPEND BOOTLIB_SOURCE
      app/bootmgr/bootmgr.h
      lib/bootlib.c
-     lib/misc/util.c)
+     lib/misc/bcd.c
+     lib/misc/util.c
+     lib/firmware/efi/firmware.c
+     lib/mm/mm.c
+     lib/mm/pagealloc.c
+     lib/mm/heapalloc.c
+     lib/mm/blkalloc.c
+     lib/mm/descriptor.c
+     lib/platform/time.c
+     lib/io/io.c
+     lib/io/device.c
+     lib/io/file.c
+     lib/io/fat.c
+     lib/platform/display.c)
 
 if(ARCH STREQUAL "i386")
-    list(APPEND BOOTMGR_COMMON_ASM_SOURCE
+    list(APPEND BOOTLIB_ASM_SOURCE
          #lib/arch/i386/foo.asm
          )
-    list(APPEND BOOTMGR_COMMON_SOURCE
-         #lib/arch/i386/foo.c
+    list(APPEND BOOTLIB_SOURCE
+         lib/arch/i386/arch.c
+         lib/mm/i386/mmx86.c
          )
 elseif(ARCH STREQUAL "amd64")
-    list(APPEND BOOTMGR_COMMON_ASM_SOURCE
+    list(APPEND BOOTLIB_ASM_SOURCE
          #lib/arch/amd64/foo.asm
          )
-    list(APPEND BOOTMGR_COMMON_SOURCE
+    list(APPEND BOOTLIB_SOURCE
          #lib/arch/amd64/foo.c
          )
 else()
 #TBD
 endif()
 
-add_asm_files(bootmgr_common_asm ${BOOTMGR_COMMON_ASM_SOURCE})
-add_library(bootmgr_common ${BOOTMGR_COMMON_SOURCE} ${bootmgr_common_asm})
-add_pch(bootmgr_common app/bootmgr/bootmgr.h BOOTMGR_COMMON_SOURCE)
-#add_dependencies(bootmgr_common bugcodes)
+add_asm_files(bootlib_asm ${BOOTLIB_ASM_SOURCE})
+add_library(bootlib ${BOOTLIB_SOURCE} ${bootlib_asm})
+add_pch(bootlib app/bootmgr/bootmgr.h BOOTLIB_SOURCE)
+add_dependencies(bootlib bugcodes xdk)
 
 list(APPEND BOOTMGR_BASE_SOURCE
      app/bootmgr/efiemu.c
      app/bootmgr/bootmgr.c
+     app/bootmgr/rtlcompat.c
      )
 
 add_executable(bootmgfw ${BOOTMGR_BASE_SOURCE})
@@ -59,9 +74,15 @@ endif()
 
 set_entrypoint(bootmgfw EfiEntry)
 
-target_link_libraries(bootmgfw bootmgr_common cportlib cmlib rtl libcntpr)
+target_link_libraries(bootmgfw bootlib cportlib cmlib rtl libcntpr)
 
-add_dependencies(bootmgfw asm)
+if(STACK_PROTECTOR)
+    target_link_libraries(bootmgfw gcc_ssp)
+elseif(RUNTIME_CHECKS)
+    target_link_libraries(bootmgfw runtmchk)
+endif()
+
+add_dependencies(bootmgfw asm bugcodes)
 
-add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION loader NO_CAB FOR bootcd regtest)
+add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION efi/boot NO_CAB FOR bootcd regtest NAME_ON_CD bootia32.efi)