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