Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums. anywhere
authorStephane Lenclud <tortoisehg@lenclud.com>
Wed, 03 Feb 2010 17:45:14 +0100
branchanywhere
changeset 48 10816385149a
parent 41 d32f34975bbf
child 49 af71d110c717
Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
kernel/eka/CMakeLists.txt
kernel/eka/euser/CMakeLists.txt
kernel/eka/euser/epoc/win32/uc_epoc.cpp
--- a/kernel/eka/CMakeLists.txt	Mon Feb 01 19:49:38 2010 +0100
+++ b/kernel/eka/CMakeLists.txt	Wed Feb 03 17:45:14 2010 +0100
@@ -17,10 +17,11 @@
 #Generate the exec enum using CMAKE custom command
 #perl genexec.pl -i execs.txt -e ../include/exec_enum.h -u ../include/exec_user.h -k ../include/exec_kernel.h
 add_custom_command (
-	OUTPUT ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h
+	OUTPUT ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h	
    	COMMAND perl ./kernel/genexec.pl -i ./kernel/execs.txt -e ./include/exec_enum.h -u ./include/exec_user.h -k ./include/kernel/exec_kernel.h
 	WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}	
    	COMMENT "Generating exec headers..."
+   	DEPENDS ./kernel/genexec.pl ./kernel/execs.txt
    	VERBATIM
  	)
 	
@@ -30,10 +31,11 @@
 set_source_files_properties(./include/kernel/exec_kernel.h PROPERTIES GENERATED 1)
 
 #Custom target that will generate our exec headers 
-add_custom_target(genexec DEPENDS ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h)
+add_custom_target(dogenexec DEPENDS ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h)
+add_custom_target(genexec)
 
 add_subdirectory(./euser)
-#add_subdirectory(./kernel)
+add_subdirectory(./kernel)
 
 
 
--- a/kernel/eka/euser/CMakeLists.txt	Mon Feb 01 19:49:38 2010 +0100
+++ b/kernel/eka/euser/CMakeLists.txt	Wed Feb 03 17:45:14 2010 +0100
@@ -30,7 +30,7 @@
 add_definitions(-D__WINS__)
 #__CPU_X86 is declared by __WINS__ 
 #add_definitions(-D__CPU_X86)
-add_definitions(-D__DLL__)
+#add_definitions(-D__DLL__)
 
 
 #set(commonDefines "__VC32__; _UNICODE;")
@@ -122,23 +122,23 @@
 add_library (euser SHARED ${source})
 add_dependencies(euser genexec emulator)
 target_link_libraries(euser emulator)
-#set_target_properties(euser PROPERTIES COMPILE_DEFINITIONS "__DLL__")
+set_target_properties(euser PROPERTIES COMPILE_DEFINITIONS "__DLL__")
 
 
 ### ESTUB: not sure why need that yet
-#add_library (estub STATIC ../euser/epoc/win32/uc_stub.cpp)
+add_library (estub STATIC ../euser/epoc/win32/uc_stub.cpp)
 #set_target_properties(estub PROPERTIES LINK_FLAGS /ENTRY:E32Bootstrap)
 
 ### SCPPNWDL_KERN: used by kernel. It contains new operators override.
 #To be linked by kernel
-#add_library (scppnwdl_kern STATIC ../euser/epoc/win32/scppnwdl.cpp)
-#add_dependencies(scppnwdl_kern euser)
+add_library (scppnwdl_kern STATIC ../euser/epoc/win32/scppnwdl.cpp)
+add_dependencies(scppnwdl_kern euser)
 
 ### EPOC: emulator executable
-#add_executable(epoc ../euser/epoc/win32/uc_exe.cpp ../euser/epoc/win32/uc_epoc.cpp) #Compile the EXE target entry point which is uc_exe.cpp 
-#add_dependencies(epoc estub euser)
+add_executable(epoc ../euser/epoc/win32/uc_exe.cpp ../euser/epoc/win32/uc_epoc.cpp) #Compile the EXE target entry point which is uc_exe.cpp 
+add_dependencies(epoc estub euser)
 #set_target_properties(epoc PROPERTIES LINK_FLAGS "/ENTRY:_E32Bootstrap /SUBSYSTEM:WINDOWS /NODEFAULTLIB")
-#target_link_libraries(epoc msvcrt)
+target_link_libraries(epoc msvcrt)
 #set_target_properties(epoc PROPERTIES COMPILE_FLAGS "/Zl")
 #set_target_properties(epoc PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup /SUBSYSTEM:WINDOWS")
 #set_target_properties(epoc PROPERTIES LINK_FLAGS "/NODEFAULTLIB")
--- a/kernel/eka/euser/epoc/win32/uc_epoc.cpp	Mon Feb 01 19:49:38 2010 +0100
+++ b/kernel/eka/euser/epoc/win32/uc_epoc.cpp	Wed Feb 03 17:45:14 2010 +0100
@@ -25,5 +25,13 @@
 	{
 	//What do we do then
 
+	CBase* base=new(ELeave) CBase();
+	delete base;
+
 	return KErrNone;
+	}
+
+TInt main()
+	{
+	return E32Main();
 	}
\ No newline at end of file