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")
368 kd/wrappers/gdbstub.c)
370 list(APPEND ASM_SOURCE kdbg/i386/kdb_help.S)
371 list(APPEND SOURCE kdbg/i386/i386-dis.c)
373 elseif(ARCH STREQUAL "amd64")
376 kd/i386/kdbg.c # Use the x86 file
379 list(APPEND ASM_SOURCE kdbg/amd64/kdb_help.S)
381 kdbg/amd64/i386-dis.c
384 elseif(ARCH STREQUAL "arm")
385 list(APPEND SOURCE kd/arm/kdbg.c)
386 elseif(ARCH STREQUAL "powerpc")
387 list(APPEND SOURCE kd/wrappers/gdbstub_powerpc.c)
400 #list(APPEND SOURCE kdbg/kdb_symbols.cmake.c)
401 list(APPEND SOURCE kdbg/kdb_symbols.c)
422 if(ARCH STREQUAL "i386")
423 list(APPEND SOURCE kd64/i386/kdx86.c)
424 elseif(ARCH STREQUAL "amd64")
425 list(APPEND SOURCE kd64/amd64/kdx64.c)
426 elseif(ARCH STREQUAL "arm")
427 list(APPEND SOURCE kd64/arm/kdarm.c)
432 add_asm_files(ntoskrnl_asm ${ASM_SOURCE})
434 add_executable(ntoskrnl
437 ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
439 if(ARCH STREQUAL "i386")
440 set_entrypoint(ntoskrnl KiSystemStartup 4)
442 set_entrypoint(ntoskrnl KiSystemStartup)
444 set_subsystem(ntoskrnl native)
447 set_image_base(ntoskrnl 0x00400000)
449 set_image_base(ntoskrnl 0x80800000)
453 if(NOT MSVC AND LTCG)
454 add_target_link_flags(ntoskrnl "-shared")
457 target_link_libraries(ntoskrnl
468 add_importlibs(ntoskrnl hal kdcom bootvid)
469 add_pch(ntoskrnl include/ntoskrnl.h)
470 add_dependencies(ntoskrnl psdk bugcodes asm)
471 add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
474 spec2def(ntkrnlmp.exe ntoskrnl.spec)
476 if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS"))
477 set_source_files_properties(${ASM_SOURCE} PROPERTIES COMPILE_DEFINITIONS "CONFIG_SMP")
480 add_asm_files(ntkrnlmp_asm ${ASM_SOURCE})
482 add_executable(ntkrnlmp
485 ${CMAKE_CURRENT_BINARY_DIR}/ntkrnlmp.def)
487 add_target_compile_definitions(ntkrnlmp CONFIG_SMP)
489 if(ARCH STREQUAL "i386")
490 set_entrypoint(ntkrnlmp KiSystemStartup 4)
492 set_entrypoint(ntkrnlmp KiSystemStartup)
494 set_subsystem(ntkrnlmp native)
497 set_image_base(ntkrnlmp 0x00400000)
499 set_image_base(ntkrnlmp 0x80800000)
503 if(NOT MSVC AND LTCG)
504 add_target_link_flags(ntkrnlmp "-shared")
507 target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib rtl rossym libcntpr wdmguid ioevent)
508 add_importlibs(ntkrnlmp hal kdcom bootvid)
509 add_dependencies(ntkrnlmp psdk bugcodes asm)
510 add_cd_file(TARGET ntkrnlmp DESTINATION reactos/system32 NO_CAB FOR all)
513 add_asm_files(ntdllsys_asm ntdll.S)
514 add_library(ntdllsys ${ntdllsys_asm})
515 set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")