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 20add_library(rtl_um OBJECT 21 rtl/libsupp.c 22 rtl/uilist.c 23 rtl/version.c) 24target_link_libraries(rtl_um ${PSEH_LIB}) 25add_dependencies(rtl_um psdk) 26 27list(APPEND SOURCE 28 dbg/dbgui.c 29 ldr/ldrapi.c 30 ldr/ldrinit.c 31 ldr/ldrpe.c 32 ldr/ldrutils.c 33 ldr/verifier.c 34 etw/trace.c) 35 36if(ARCH STREQUAL "i386") 37 list(APPEND ASM_SOURCE dispatch/i386/dispatch.S) 38elseif(ARCH STREQUAL "amd64") 39 list(APPEND ASM_SOURCE dispatch/amd64/dispatch.S) 40elseif(ARCH STREQUAL "arm") 41 list(APPEND ASM_SOURCE dispatch/arm/stubs_asm.s) 42else() 43 list(APPEND SOURCE dispatch/dispatch.c) 44endif() 45 46add_asm_files(ntdll_asm ${ASM_SOURCE}) 47 48list(APPEND PCH_SKIP_SOURCE 49 ${CMAKE_CURRENT_BINARY_DIR}/ntdll_stubs.c) 50 51add_library(ntdll MODULE 52 ${SOURCE} 53 ${ntdll_asm} 54 ${PCH_SKIP_SOURCE} 55 def/ntdll.rc 56 ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def) 57 58set_module_type(ntdll win32dll ENTRYPOINT 0) 59############################################# 60## HACK FOR MSVC COMPILATION WITH win32dll ## 61set_subsystem(ntdll console) 62################# END HACK ################# 63 64target_link_libraries(ntdll csrlib rtl rtl_um rtl_vista ntdllsys libcntpr uuid ${PSEH_LIB}) 65 66if (STACK_PROTECTOR) 67 target_sources(ntdll PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>) 68endif() 69 70add_pch(ntdll include/ntdll.h "${PCH_SKIP_SOURCE}") 71add_dependencies(ntdll ntstatus asm) 72add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB FOR all) 73