2 spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB)
11 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys)
28 if(ARCH STREQUAL "i386")
29 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S)
30 elseif(ARCH STREQUAL "amd64")
31 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S)
32 elseif(ARCH STREQUAL "arm")
33 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s)
35 list(APPEND SOURCE dispatch/dispatch.c)
38 add_asm_files(ntdll_asm ${ASM_SOURCE})
40 list(APPEND PCH_SKIP_SOURCE
41 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c)
43 add_library(ntdll MODULE
48 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
50 set_module_type(ntdll win32dll ENTRYPOINT 0)
51 #############################################
52 ## HACK FOR MSVC COMPILATION WITH win32dll ##
53 set_subsystem(ntdll console)
54 ################# END HACK #################
57 add_target_link_flags(ntdll "/RELEASE")
60 target_link_libraries(ntdll rtl ntdllsys libcntpr uuid ${PSEH_LIB})
61 add_pch(ntdll include/ntdll.h "${PCH_SKIP_SOURCE}")
62 add_dependencies(ntdll ntstatus asm)
63 add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all)