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
276 list(APPEND ASM_SOURCE ex/zw.S)
278 if(ARCH STREQUAL "i386")
279 list(APPEND ASM_SOURCE
280 ex/i386/fastinterlck_asm.S
284 ke/i386/usercall_asm.S
287 config/i386/cmhardwr.c
307 elseif(ARCH STREQUAL "amd64")
308 list(APPEND ASM_SOURCE
313 config/i386/cmhardwr.c
327 elseif(ARCH STREQUAL "arm")
328 list(APPEND ASM_SOURCE
334 config/arm/cmhardwr.c
345 elseif(ARCH STREQUAL "powerpc")
346 list(APPEND ASM_SOURCE
347 ke/powerpc/main_asm.S
348 ke/powerpc/ctxhelp.S)
350 config/powerpc/cmhardwr.c
356 ke/powerpc/systimer.c
358 ke/powerpc/ctxswitch.c
364 if(ARCH STREQUAL "i386")
367 kd/wrappers/gdbstub.c)
369 list(APPEND ASM_SOURCE kdbg/i386/kdb_help.S)
370 list(APPEND SOURCE kdbg/i386/i386-dis.c)
372 elseif(ARCH STREQUAL "amd64")
377 list(APPEND ASM_SOURCE kdbg/amd64/kdb_help.S)
379 kdbg/amd64/i386-dis.c
382 elseif(ARCH STREQUAL "powerpc")
383 list(APPEND SOURCE kd/wrappers/gdbstub_powerpc.c)
396 #list(APPEND SOURCE kdbg/kdb_symbols.cmake.c)
397 list(APPEND SOURCE kdbg/kdb_symbols.c)
418 if(ARCH STREQUAL "i386")
419 list(APPEND SOURCE kd64/i386/kdx86.c)
420 elseif(ARCH STREQUAL "amd64")
421 list(APPEND SOURCE kd64/amd64/kdx64.c)
422 elseif(ARCH STREQUAL "arm")
423 list(APPEND SOURCE kd64/arm/kdarm.c)
428 add_asm_files(ntoskrnl_asm ${ASM_SOURCE})
430 add_executable(ntoskrnl
433 ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
435 if(ARCH STREQUAL "i386")
436 set_entrypoint(ntoskrnl KiSystemStartup 4)
438 set_entrypoint(ntoskrnl KiSystemStartup)
440 set_subsystem(ntoskrnl native)
443 set_image_base(ntoskrnl 0x00400000)
445 set_image_base(ntoskrnl 0x80800000)
449 if(NOT MSVC AND LTCG)
450 add_target_link_flags(ntoskrnl "-shared")
453 target_link_libraries(ntoskrnl
464 add_importlibs(ntoskrnl hal kdcom bootvid)
465 add_pch(ntoskrnl include/ntoskrnl.h)
466 add_dependencies(ntoskrnl psdk bugcodes asm)
467 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
470 spec2def(ntkrnlmp.exe ntoskrnl.spec)
472 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
473 set_source_files_properties(${ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
476 add_asm_files(ntkrnlmp_asm ${ASM_SOURCE})
478 add_executable(ntkrnlmp
481 ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
483 add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
485 if(ARCH STREQUAL "i386")
486 set_entrypoint(ntkrnlmp KiSystemStartup 4)
488 set_entrypoint(ntkrnlmp KiSystemStartup)
490 set_subsystem(ntkrnlmp native)
493 set_image_base(ntkrnlmp 0x00400000)
495 set_image_base(ntkrnlmp 0x80800000)
499 if(NOT MSVC AND LTCG)
500 add_target_link_flags(ntkrnlmp "-shared")
503 target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib rtl rossym libcntpr wdmguid ioevent)
504 add_importlibs(ntkrnlmp hal kdcom bootvid)
505 add_dependencies(ntkrnlmp psdk bugcodes asm)
506 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)
509 add_asm_files(ntdllsys_asm ntdll.S)
510 add_library(ntdllsys ${ntdllsys_asm})
511 set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")