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