kernel/eka/CMakeLists.txt
author Stephane Lenclud <tortoisehg@lenclud.com>
Wed, 03 Feb 2010 17:45:14 +0100
branchanywhere
changeset 48 10816385149a
parent 38 422372aa20a3
child 50 999bb78c71ac
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
     1
# Copyright (c) 2009-2010 Stéphane Lenclud.
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     2
# All rights reserved.
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     3
# This component and the accompanying materials are made available
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     5
# which accompanies this distribution, and is available
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     7
#
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     8
# Initial Contributors:
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     9
# Stéphane Lenclud.
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    10
#
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    11
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    12
project (eka)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    13
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    14
cmake_minimum_required(VERSION 2.6)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    15
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    16
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
    17
#Generate the exec enum using CMAKE custom command
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    18
#perl genexec.pl -i execs.txt -e ../include/exec_enum.h -u ../include/exec_user.h -k ../include/exec_kernel.h
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
    19
add_custom_command (
48
10816385149a 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.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 38
diff changeset
    20
	OUTPUT ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h	
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    21
   	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
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    22
	WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}	
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
    23
   	COMMENT "Generating exec headers..."
48
10816385149a 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.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 38
diff changeset
    24
   	DEPENDS ./kernel/genexec.pl ./kernel/execs.txt
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
    25
   	VERBATIM
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
    26
 	)
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    27
	
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    28
#Tell cmake those file won't be available until build time
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    29
set_source_files_properties(./include/exec_enum.h PROPERTIES GENERATED 1)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    30
set_source_files_properties(./include/exec_user.h PROPERTIES GENERATED 1)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    31
set_source_files_properties(./include/kernel/exec_kernel.h PROPERTIES GENERATED 1)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    32
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    33
#Custom target that will generate our exec headers 
48
10816385149a 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.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 38
diff changeset
    34
add_custom_target(dogenexec DEPENDS ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h)
10816385149a 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.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 38
diff changeset
    35
add_custom_target(genexec)
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    36
25
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 24
diff changeset
    37
add_subdirectory(./euser)
48
10816385149a 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.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 38
diff changeset
    38
add_subdirectory(./kernel)
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    39
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents: 23
diff changeset
    40
27
cf41e127747a Managed to copy ekern.dll along side epoc.exe so that debug session is made easy. ekern.dll is expected to export _E32Startup put it does not. Should ekern compile that k_entry.cpp file?
Slion
parents: 25
diff changeset
    41
cf41e127747a Managed to copy ekern.dll along side epoc.exe so that debug session is made easy. ekern.dll is expected to export _E32Startup put it does not. Should ekern compile that k_entry.cpp file?
Slion
parents: 25
diff changeset
    42