2011-05-16 13:12:07 +00:00
|
|
|
|
2012-03-07 21:21:27 +00:00
|
|
|
spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
-D__NTDLL__
|
|
|
|
-D_NTOSKRNL_
|
|
|
|
-DCRTDLL)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
BEFORE include
|
2016-04-20 12:36:25 +00:00
|
|
|
${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
list(APPEND SOURCE
|
|
|
|
csr/api.c
|
|
|
|
csr/capture.c
|
|
|
|
csr/connect.c
|
|
|
|
dbg/dbgui.c
|
2011-08-28 18:28:18 +00:00
|
|
|
ldr/ldrapi.c
|
|
|
|
ldr/ldrinit.c
|
|
|
|
ldr/ldrpe.c
|
|
|
|
ldr/ldrutils.c
|
2018-04-27 20:43:45 +00:00
|
|
|
ldr/verifier.c
|
2011-05-16 13:12:07 +00:00
|
|
|
rtl/libsupp.c
|
2017-06-03 20:26:26 +00:00
|
|
|
rtl/uilist.c
|
2011-05-16 13:12:07 +00:00
|
|
|
rtl/version.c
|
2014-09-16 20:40:33 +00:00
|
|
|
etw/trace.c
|
2014-02-12 10:36:53 +00:00
|
|
|
include/ntdll.h)
|
2011-08-28 18:28:18 +00:00
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "amd64")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S)
|
2012-08-27 18:58:27 +00:00
|
|
|
elseif(ARCH STREQUAL "arm")
|
2013-01-08 20:33:08 +00:00
|
|
|
list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s)
|
2011-05-16 13:12:07 +00:00
|
|
|
else()
|
2011-08-28 18:28:18 +00:00
|
|
|
list(APPEND SOURCE dispatch/dispatch.c)
|
2013-01-08 20:33:08 +00:00
|
|
|
endif()
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2013-01-08 20:33:08 +00:00
|
|
|
add_asm_files(ntdll_asm ${ASM_SOURCE})
|
2014-02-12 10:36:53 +00:00
|
|
|
|
2019-03-20 13:19:48 +00:00
|
|
|
add_library(ntdll MODULE
|
2014-02-12 10:36:53 +00:00
|
|
|
${SOURCE}
|
|
|
|
${ntdll_asm}
|
|
|
|
def/ntdll.rc
|
2014-05-08 14:07:36 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c
|
2014-02-12 10:36:53 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2015-11-04 18:06:16 +00:00
|
|
|
set_module_type(ntdll win32dll ENTRYPOINT 0)
|
2013-09-01 00:11:56 +00:00
|
|
|
#############################################
|
|
|
|
## HACK FOR MSVC COMPILATION WITH win32dll ##
|
|
|
|
set_subsystem(ntdll console)
|
|
|
|
################# END HACK #################
|
2011-05-16 13:12:07 +00:00
|
|
|
|
|
|
|
if(MSVC)
|
2011-09-03 18:59:14 +00:00
|
|
|
add_target_link_flags(ntdll "/RELEASE")
|
2011-05-16 13:12:07 +00:00
|
|
|
endif()
|
|
|
|
|
2014-10-17 23:28:29 +00:00
|
|
|
target_link_libraries(ntdll rtl ntdllsys libcntpr uuid ${PSEH_LIB})
|
2014-02-12 10:36:53 +00:00
|
|
|
add_pch(ntdll include/ntdll.h SOURCE)
|
2011-05-16 13:12:07 +00:00
|
|
|
add_dependencies(ntdll ntstatus asm)
|
|
|
|
add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)
|