author | Slion |
Wed, 03 Feb 2010 22:15:32 +0100 | |
branch | anywhere |
changeset 50 | 999bb78c71ac |
parent 48 | 10816385149a |
child 95 | f561f9ae805b |
permissions | -rw-r--r-- |
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 | 2 |
# All rights reserved. |
3 |
# This component and the accompanying materials are made available |
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
|
5 |
# which accompanies this distribution, and is available |
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
# |
|
8 |
# Initial Contributors: |
|
9 |
# Stéphane Lenclud. |
|
10 |
# |
|
11 |
||
12 |
project (eka) |
|
13 |
||
14 |
cmake_minimum_required(VERSION 2.6) |
|
15 |
||
50 | 16 |
add_definitions(-D__SYMC__) |
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
|
17 |
|
21
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
18 |
#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
|
19 |
#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
|
20 |
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
|
21 |
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
|
22 |
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
|
23 |
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
|
24 |
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
|
25 |
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
|
26 |
VERBATIM |
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
27 |
) |
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
|
28 |
|
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 |
#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
|
30 |
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
|
31 |
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
|
32 |
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
|
33 |
|
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
|
34 |
#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
|
35 |
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
|
36 |
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
|
37 |
|
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
|
38 |
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
|
39 |
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
|
40 |
|
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
|
41 |
|
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
|
42 |
|
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
|
43 |