2011-05-16 13:12:07 +00:00
|
|
|
|
2012-06-12 22:28:46 +00:00
|
|
|
PROJECT(NTOS)
|
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
include(ntos.cmake)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
set(NTOSKRNL_SOURCE ${SOURCE})
|
|
|
|
set(NTOSKRNL_ASM_SOURCE ${ASM_SOURCE})
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
set(NTKRNLMP_SOURCE ${SOURCE})
|
|
|
|
set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2014-02-10 17:12:41 +00:00
|
|
|
add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
|
2013-01-08 20:33:08 +00:00
|
|
|
|
2012-04-13 21:35:00 +00:00
|
|
|
add_executable(ntoskrnl
|
2013-01-08 20:33:08 +00:00
|
|
|
${ntoskrnl_asm}
|
2014-02-10 17:12:41 +00:00
|
|
|
${NTOSKRNL_SOURCE}
|
|
|
|
guid.c
|
|
|
|
ntoskrnl.rc
|
2012-04-13 21:35:00 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2012-08-27 18:58:27 +00:00
|
|
|
if(ARCH STREQUAL "i386")
|
2012-12-22 10:47:06 +00:00
|
|
|
set_entrypoint(ntoskrnl KiSystemStartup 4)
|
2011-06-06 19:08:39 +00:00
|
|
|
else()
|
2012-12-22 10:47:06 +00:00
|
|
|
set_entrypoint(ntoskrnl KiSystemStartup)
|
2011-06-06 19:08:39 +00:00
|
|
|
endif()
|
2011-05-16 13:12:07 +00:00
|
|
|
set_subsystem(ntoskrnl native)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set_image_base(ntoskrnl 0x00400000)
|
|
|
|
else()
|
|
|
|
set_image_base(ntoskrnl 0x80800000)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
target_link_libraries(ntoskrnl
|
|
|
|
cportlib
|
|
|
|
csq
|
|
|
|
${PSEH_LIB}
|
|
|
|
cmlib
|
|
|
|
rtl
|
2013-09-19 22:29:36 +00:00
|
|
|
${ROSSYM_LIB}
|
2011-05-16 13:12:07 +00:00
|
|
|
libcntpr
|
|
|
|
wdmguid
|
|
|
|
ioevent)
|
|
|
|
|
|
|
|
add_importlibs(ntoskrnl hal kdcom bootvid)
|
2014-02-10 17:12:41 +00:00
|
|
|
add_pch(ntoskrnl ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTOSKRNL_SOURCE)
|
2011-05-16 13:12:07 +00:00
|
|
|
add_dependencies(ntoskrnl psdk bugcodes asm)
|
|
|
|
add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
|
2012-03-07 21:21:27 +00:00
|
|
|
|
2012-04-13 16:16:39 +00:00
|
|
|
if(BUILD_MP)
|
2014-02-10 17:12:41 +00:00
|
|
|
add_subdirectory(ntkrnlmp)
|
2012-04-13 16:16:39 +00:00
|
|
|
endif()
|
2011-05-16 13:12:07 +00:00
|
|
|
|
2013-01-08 20:33:08 +00:00
|
|
|
add_asm_files(ntdllsys_asm ntdll.S)
|
|
|
|
add_library(ntdllsys ${ntdllsys_asm})
|
|
|
|
set_target_properties(ntdllsys PROPERTIES LINKER_LANGUAGE "C")
|