4 spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
8 ${REACTOS_SOURCE_DIR}/lib/cmlib
10 ${CMAKE_CURRENT_BINARY_DIR}/include
11 ${CMAKE_CURRENT_BINARY_DIR}/include/internal
12 ${REACTOS_SOURCE_DIR}/include/reactos/drivers)
19 -DNTDDI_VERSION=0x05020400)
26 add_definitions(-DNEWCC)
49 cache/section/reqtools.c
51 cache/section/swapout.c
138 io/iomgr/controller.c
164 io/pnpmgr/pnpnotify.c
165 io/pnpmgr/pnpreport.c
277 list(APPEND ASM_SOURCE ex/zw.S)
279 if(ARCH STREQUAL "i386")
280 list(APPEND ASM_SOURCE
281 ex/i386/fastinterlck_asm.S
285 ke/i386/usercall_asm.S
288 config/i386/cmhardwr.c
308 elseif(ARCH STREQUAL "amd64")
309 list(APPEND ASM_SOURCE
314 config/i386/cmhardwr.c
328 elseif(ARCH STREQUAL "arm")
329 list(APPEND ASM_SOURCE
335 config/arm/cmhardwr.c
346 elseif(ARCH STREQUAL "powerpc")
347 list(APPEND ASM_SOURCE
348 ke/powerpc/main_asm.S
349 ke/powerpc/ctxhelp.S)
351 config/powerpc/cmhardwr.c
357 ke/powerpc/systimer.c
359 ke/powerpc/ctxswitch.c
365 if(ARCH STREQUAL "i386")
369 kd/wrappers/gdbstub.c)
371 list(APPEND ASM_SOURCE kdbg/i386/kdb_help.S)
372 list(APPEND SOURCE kdbg/i386/i386-dis.c)
374 elseif(ARCH STREQUAL "amd64")
377 kd/i386/kdbg.c # Use the x86 file
380 list(APPEND ASM_SOURCE kdbg/amd64/kdb_help.S)
382 kdbg/amd64/i386-dis.c
385 elseif(ARCH STREQUAL "arm")
386 list(APPEND SOURCE kd/arm/kdbg.c)
387 elseif(ARCH STREQUAL "powerpc")
388 list(APPEND SOURCE kd/wrappers/gdbstub_powerpc.c)
419 if(ARCH STREQUAL "i386")
420 list(APPEND SOURCE kd64/i386/kdx86.c)
421 elseif(ARCH STREQUAL "amd64")
422 list(APPEND SOURCE kd64/amd64/kdx64.c)
423 elseif(ARCH STREQUAL "arm")
424 list(APPEND SOURCE kd64/arm/kdarm.c)
429 add_asm_files(ntoskrnl_asm ${ASM_SOURCE})
431 add_executable(ntoskrnl
434 ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
436 if(ARCH STREQUAL "i386")
437 set_entrypoint(ntoskrnl KiSystemStartup 4)
439 set_entrypoint(ntoskrnl KiSystemStartup)
441 set_subsystem(ntoskrnl native)
444 set_image_base(ntoskrnl 0x00400000)
446 set_image_base(ntoskrnl 0x80800000)
450 if(NOT MSVC AND LTCG)
451 add_target_link_flags(ntoskrnl "-shared")
454 target_link_libraries(ntoskrnl
465 add_importlibs(ntoskrnl hal kdcom bootvid)
466 add_pch(ntoskrnl include/ntoskrnl.h)
467 add_dependencies(ntoskrnl psdk bugcodes asm)
468 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
471 spec2def(ntkrnlmp.exe ntoskrnl.spec)
473 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
474 set_source_files_properties(${ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
477 add_asm_files(ntkrnlmp_asm ${ASM_SOURCE})
479 add_executable(ntkrnlmp
482 ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
484 add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
486 if(ARCH STREQUAL "i386")
487 set_entrypoint(ntkrnlmp KiSystemStartup 4)
489 set_entrypoint(ntkrnlmp KiSystemStartup)
491 set_subsystem(ntkrnlmp native)
494 set_image_base(ntkrnlmp 0x00400000)
496 set_image_base(ntkrnlmp 0x80800000)
500 if(NOT MSVC AND LTCG)
501 add_target_link_flags(ntkrnlmp "-shared")
504 target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
505 add_importlibs(ntkrnlmp hal kdcom bootvid)
506 add_dependencies(ntkrnlmp psdk bugcodes asm)
507 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)
510 add_asm_files(ntdllsys_asm ntdll.S)
511 add_library(ntdllsys ${ntdllsys_asm})
512 set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")