kernel/eka/kernel/CMakeLists.txt
branchanywhere
changeset 24 18d195b75193
child 25 57330c35d3d7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/kernel/CMakeLists.txt	Wed Jan 06 20:35:57 2010 +0100
@@ -0,0 +1,141 @@
+# Copyright (c) 2009 Stéphane Lenclud.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Stéphane Lenclud.
+#
+
+project (kernel)
+
+cmake_minimum_required(VERSION 2.6)
+
+#Add the given source files to our source prepending the sourcepath
+macro(add_source)
+	foreach(mySource ${ARGV})
+		string(REGEX REPLACE "(^.+)" "${sourcepath}\\1" newsource ${mySource})
+		set(source ${source} ${newsource})
+	endforeach(mySource) 
+endmacro(add_source) 
+
+add_definitions(-DUNICODE)
+add_definitions(-D__VC32__)
+add_definitions(-D_UNICODE)
+add_definitions(-D__LEAVE_EQUALS_THROW__)
+add_definitions(-D__WINS__)
+add_definitions(-D__EXPORT_MEMCPY__)				
+add_definitions(-D__IN_KERNEL__)
+add_definitions(-D__KERNEL_MODE__)
+
+#__CPU_X86 is declared by __WINS__ 
+#add_definitions(-D__CPU_X86)
+#add_definitions(-D__DLL__)
+
+include_directories (../euser ../euser/unicode ../include 
+../include/nkern ../include/nkern/win32 ../include/kernel ../include/kernel/win32 ../include/memmodel/emul/win32 ../include/memmodel/emul)
+
+#Define source for ekern
+set (sourcepath ../nkern/)
+add_source(
+nkern.cpp nkerns.cpp sched.cpp dfcs.cpp nk_timer.cpp
+nk_old.cpp
+)
+
+set (sourcepath ../common/win32/)
+add_source(
+atomics.cpp
+)
+
+set (sourcepath ../nkern/win32/)
+add_source(
+vectors.cpp ncsched.cpp nctimer.cpp ncutilf.cpp ncutils.cpp
+ncthrd.cpp ncglob.cpp
+)
+
+set (sourcepath ../common/win32/)
+add_source(
+seh.cpp
+)
+
+set (sourcepath ../kernel/win32/)
+add_source(
+cboot.cpp
+cglobals.cpp cexec.cpp cinit.cpp
+ckernel.cpp csched.cpp
+cutils.cpp cache.cpp
+)
+#k_entry.cpp
+
+
+set (sourcepath ../kernel/)
+add_source(
+sglobals.cpp device.cpp eventq.cpp
+sexec.cpp sinit.cpp skernel.cpp
+scodeseg.cpp sipc.cpp notifier.cpp 
+object.cpp power.cpp server.cpp
+stimer.cpp sutils.cpp random.cpp
+sprocess.cpp sthread.cpp 
+smqueue.cpp
+sproperty.cpp
+ssharedio.cpp
+ssecure.cpp
+emi.cpp
+objectix.cpp
+sbtrace.cpp
+stest.cpp
+sshbuf.cpp smap.cpp
+)
+				
+set (sourcepath ../klib/)
+add_source(
+dbase.cpp kdes8.cpp
+kheap.cpp bma.cpp
+)
+
+#
+set (sourcepath ../common/)
+add_source(
+alloc.cpp array.cpp des8.cpp heap.cpp mem.cpp
+secure.cpp
+)
+
+set (sourcepath ../memmodel/emul/)
+add_source(
+pglobals.cpp
+nvram.cpp
+)
+
+#
+set (sourcepath ../memmodel/emul/win32/)
+add_source(
+zrom.cpp
+mchunk.cpp mglobals.cpp minit.cpp mkernel.cpp
+mcodeseg.cpp mprocess.cpp mutils.cpp mshbuf.cpp
+)
+
+#add_executable(ekern ${source})
+add_library(ekern SHARED ${source})
+add_dependencies(ekern genexec emulator)
+				
+#library					
+#include "../memmodel/memmodel.mmp"
+
+
+#macro					
+
+
+#No need for emulator here
+#add_executable(epoc ./euser/epoc/win32/uc_epoc.cpp)
+#target_link_libraries(epoc estub euser)
+
+
+
+
+#define vs IDE folders
+source_group(Sources REGULAR_EXPRESSION ".+\\.cpp$")
+source_group(Includes REGULAR_EXPRESSION ".+\\.h$") 	
+
+