# HG changeset patch # User Stephane Lenclud # Date 1265215514 -3600 # Node ID 10816385149a4a251ef0a0161328798d440b7949 # Parent d32f34975bbfad438b557f58509a549acf671329 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. diff -r d32f34975bbf -r 10816385149a kernel/eka/CMakeLists.txt --- 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) diff -r d32f34975bbf -r 10816385149a kernel/eka/euser/CMakeLists.txt --- 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") diff -r d32f34975bbf -r 10816385149a kernel/eka/euser/epoc/win32/uc_epoc.cpp --- 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