[NTOSKRNL]
[reactos.git] / ntoskrnl / CMakeLists.txt
index 8c669a8..67d30c1 100644 (file)
@@ -32,7 +32,6 @@ if(NEWCC)
         cache/pinsup.c
         cache/section/data.c
         cache/section/fault.c
-        cache/section/io.c
         cache/section/reqtools.c
         cache/section/sptab.c
         cache/section/swapout.c)
@@ -47,6 +46,7 @@ else()
 endif()
 
 list(APPEND SOURCE
+    cache/section/io.c
     config/cmalloc.c
     config/cmapi.c
     config/cmboot.c
@@ -83,12 +83,12 @@ list(APPEND SOURCE
     ex/event.c
     ex/evtpair.c
     ex/exintrin.c
-    ex/fastinterlck.c
     ex/fmutex.c
     ex/handle.c
     ex/harderr.c
     ex/hdlsterm.c
     ex/init.c
+    ex/interlocked.c
     ex/keyedevt.c
     ex/locale.c
     ex/lookas.c
@@ -107,6 +107,7 @@ list(APPEND SOURCE
     ex/work.c
     ex/xipdisp.c
     ex/zone.c
+    ex/zw.S
     fsrtl/dbcsname.c
     fsrtl/fastio.c
     fsrtl/faulttol.c
@@ -126,6 +127,7 @@ list(APPEND SOURCE
     fstub/disksup.c
     fstub/fstubex.c
     fstub/halstub.c
+       fstub/translate.c
     inbv/inbv.c
     inbv/inbvport.c
     io/iomgr/adapter.c
@@ -212,6 +214,7 @@ list(APPEND SOURCE
     mm/ARM3/pool.c
     mm/ARM3/procsup.c
     mm/ARM3/section.c
+    mm/ARM3/special.c
     mm/ARM3/sysldr.c
     mm/ARM3/syspte.c
     mm/ARM3/vadnode.c
@@ -269,16 +272,13 @@ list(APPEND SOURCE
     vf/driver.c
     wmi/wmi.c
     ntoskrnl.rc
-    ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S
     ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl.def)
 
 if(ARCH MATCHES i386)
     list(APPEND SOURCE
         config/i386/cmhardwr.c
-        ex/i386/interlck_asm.S
         ex/i386/fastinterlck_asm.S
         ex/i386/ioport.S
-        ke/freeldr.c
         ke/i386/abios.c
         ke/i386/cpu.c
         ke/i386/context.c
@@ -305,7 +305,6 @@ if(ARCH MATCHES i386)
 elseif(ARCH MATCHES amd64)
     list(APPEND SOURCE
         config/i386/cmhardwr.c
-        ex/amd64/fastinterlck.c
         ke/amd64/boot.S
         ke/amd64/context.c
         ke/amd64/cpu.c
@@ -314,6 +313,7 @@ elseif(ARCH MATCHES amd64)
         ke/amd64/interrupt.c
         ke/amd64/irql.c
         ke/amd64/kiinit.c
+        ke/amd64/krnlinit.c
         ke/amd64/spinlock.c
         ke/amd64/stubs.c
         ke/amd64/thrdini.c
@@ -389,6 +389,7 @@ if(NOT _WINKD_)
     endif()
 
     if(DBG OR KDBG)
+        #list(APPEND SOURCE kdbg/kdb_symbols.cmake.c)
         list(APPEND SOURCE kdbg/kdb_symbols.c)
     endif()
 
@@ -420,9 +421,13 @@ else() # _WINKD_
 
 endif()
 
-add_executable(ntoskrnl ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl_ntoskrnl.h.gch ${SOURCE})
+add_executable(ntoskrnl ${SOURCE})
 
-set_entrypoint(ntoskrnl KiSystemStartup@4)
+if (ARCH MATCHES i386)
+  set_entrypoint(ntoskrnl KiSystemStartup 4)
+else()
+  set_entrypoint(ntoskrnl KiSystemStartup)
+endif()
 set_subsystem(ntoskrnl native)
 
 if(MSVC)
@@ -441,13 +446,13 @@ target_link_libraries(ntoskrnl
     libcntpr
     wdmguid
     ioevent)
-    
+
 add_importlibs(ntoskrnl hal kdcom bootvid)
 
-add_pch(ntoskrnl ${CMAKE_CURRENT_SOURCE_DIR}/include/ntoskrnl.h ${SOURCE})
-set_source_files_properties(${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S PROPERTIES GENERATED TRUE)
-add_dependencies(ntoskrnl psdk bugcodes kernel_zw kernel_napi asm)
+add_pch(ntoskrnl include/ntoskrnl.h)
+add_dependencies(ntoskrnl psdk bugcodes asm)
+
+add_cd_file(TARGET ntoskrnl DESTINATION reactos/system32 NO_CAB FOR all)
+add_importlib_target(ntoskrnl.spec)
 
-add_minicd_target(ntoskrnl reactos ntoskrnl.exe)
-add_livecd_target(ntoskrnl reactos/system32)
-add_importlib_target(ntoskrnl.spec ntoskrnl.exe)
+add_library(ntdllsys ntdll.S)