mirror of
https://github.com/reactos/reactos.git
synced 2024-06-09 22:15:23 +00:00
[BOOT][SDK:CMLIB] Compile a CMLIB for FreeLdr / NT bootloader with correct definitions. (#4619)
This also allows using the CMLIB with any reduced functionality that could be required at boot-time.
This commit is contained in:
parent
95b3e7508e
commit
5cadc268ef
|
@ -101,7 +101,7 @@ endif()
|
||||||
|
|
||||||
set_entrypoint(bootmgfw EfiEntry)
|
set_entrypoint(bootmgfw EfiEntry)
|
||||||
|
|
||||||
target_link_libraries(bootmgfw bootlib cportlib cmlib blrtl libcntpr)
|
target_link_libraries(bootmgfw bootlib cportlib blcmlib blrtl libcntpr)
|
||||||
|
|
||||||
# dynamic analysis switches
|
# dynamic analysis switches
|
||||||
if(STACK_PROTECTOR)
|
if(STACK_PROTECTOR)
|
||||||
|
@ -149,7 +149,7 @@ else()
|
||||||
set_entrypoint(rosload OslMain)
|
set_entrypoint(rosload OslMain)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(rosload bootlib cportlib cmlib blrtl libcntpr)
|
target_link_libraries(rosload bootlib cportlib blcmlib blrtl libcntpr)
|
||||||
|
|
||||||
# dynamic analysis switches
|
# dynamic analysis switches
|
||||||
if(STACK_PROTECTOR)
|
if(STACK_PROTECTOR)
|
||||||
|
|
|
@ -293,7 +293,7 @@ if(ARCH STREQUAL "i386")
|
||||||
target_link_libraries(freeldr_pe mini_hal)
|
target_link_libraries(freeldr_pe mini_hal)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(freeldr_pe freeldr_common cportlib cmlib blrtl libcntpr)
|
target_link_libraries(freeldr_pe freeldr_common cportlib blcmlib blrtl libcntpr)
|
||||||
|
|
||||||
# dynamic analysis switches
|
# dynamic analysis switches
|
||||||
if(STACK_PROTECTOR)
|
if(STACK_PROTECTOR)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D_BLDR_
|
|
||||||
-D_NTSYSTEM_
|
-D_NTSYSTEM_
|
||||||
-DNASSERT)
|
-DNASSERT)
|
||||||
|
|
||||||
|
@ -19,10 +18,18 @@ list(APPEND SOURCE
|
||||||
cmlib.h)
|
cmlib.h)
|
||||||
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
# CMLIB for NT bootloader
|
||||||
|
add_library(blcmlib ${SOURCE})
|
||||||
|
target_compile_definitions(blcmlib PRIVATE _BLDR_)
|
||||||
|
add_dependencies(blcmlib bugcodes xdk)
|
||||||
|
add_pch(blcmlib cmlib.h SOURCE)
|
||||||
|
|
||||||
|
# CMLIB for NT kernel
|
||||||
add_library(cmlib ${SOURCE})
|
add_library(cmlib ${SOURCE})
|
||||||
add_dependencies(cmlib bugcodes xdk)
|
add_dependencies(cmlib bugcodes xdk)
|
||||||
add_pch(cmlib cmlib.h SOURCE)
|
add_pch(cmlib cmlib.h SOURCE)
|
||||||
else()
|
else()
|
||||||
|
# CMLIB for host-tools
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D__NO_CTYPE_INLINES
|
-D__NO_CTYPE_INLINES
|
||||||
-DCMLIB_HOST)
|
-DCMLIB_HOST)
|
||||||
|
|
Loading…
Reference in a new issue