1 2add_subdirectory(nt_0600) 3 4spec2def(ntdll.dll def/ntdll.spec ADD_IMPORTLIB) 5 6# Embed RTC libs 7if (STACK_PROTECTOR) 8 target_sources(libntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>) 9endif() 10 11add_definitions( 12 -D__NTDLL__ 13 -D_NTOSKRNL_ 14 -DCRTDLL) 15 16include_directories( 17 BEFORE include 18 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/subsys) 19 20list(APPEND SOURCE 21 csr/api.c 22 csr/capture.c 23 csr/connect.c 24 dbg/dbgui.c 25 ldr/ldrapi.c 26 ldr/ldrinit.c 27 ldr/ldrpe.c 28 ldr/ldrutils.c 29 ldr/verifier.c 30 rtl/libsupp.c 31 rtl/uilist.c 32 rtl/version.c 33 etw/trace.c) 34 35if(ARCH STREQUAL "i386") 36 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S) 37elseif(ARCH STREQUAL "amd64") 38 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S) 39elseif(ARCH STREQUAL "arm") 40 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s) 41else() 42 list(APPEND SOURCE dispatch/dispatch.c) 43endif() 44 45add_asm_files(ntdll_asm ${ASM_SOURCE}) 46 47list(APPEND PCH_SKIP_SOURCE 48 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c) 49 50add_library(ntdll MODULE 51 ${SOURCE} 52 ${ntdll_asm} 53 ${PCH_SKIP_SOURCE} 54 def/ntdll.rc 55 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def) 56 57set_module_type(ntdll win32dll ENTRYPOINT 0) 58############################################# 59## HACK FOR MSVC COMPILATION WITH win32dll ## 60set_subsystem(ntdll console) 61################# END HACK ################# 62 63target_link_libraries(ntdll rtl rtl_vista ntdllsys libcntpr uuid ${PSEH_LIB}) 64 65if (STACK_PROTECTOR) 66 target_sources(ntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>) 67endif() 68 69add_pch(ntdll include/ntdll.h "${PCH_SKIP_SOURCE}") 70add_dependencies(ntdll ntstatus asm) 71add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all) 72