Compare commits

..

1 Commits

Author SHA1 Message Date
stubbfel
fc86d1e5f7 add examples 2018-03-08 01:51:21 +01:00
2 changed files with 2 additions and 12 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "examples/LKMPG"]
path = examples/LKMPG
url = gitea@gitea.stubbe.rocks:3rd-party/LKMPG.git
url = https://github.com/bashrc/LKMPG.git

View File

@@ -1,13 +1,3 @@
# CMake-Module-KernelModuleBuilder
With this cmake module the user can build/create/describe kernel modules in a CMakeLists.txt, in the way like a usespace executable or lib. E.g. see the CMakeLists.txt in example folder.
* `include_directories` - "Add include directories to the build." -> https://cmake.org/cmake/help/latest/command/include_directories.html
* this cmake module will use the include entries from the `INCLUDE_DIRECTORIES` property (https://cmake.org/cmake/help/latest/prop_dir/INCLUDE_DIRECTORIES.html) of the `${CMAKE_CURRENT_SOURCE_DIR}` directory (https://cmake.org/cmake/help/latest/variable/CMAKE_CURRENT_SOURCE_DIR.html)
* `add_definitions` - "Adds -D define flags to the compilation of source files." -> https://cmake.org/cmake/help/latest/command/add_definitions.html
* this cmake module will use the definition entries from the `COMPILE_DEFINITIONS` property (https://cmake.org/cmake/help/latest/prop_dir/COMPILE_DEFINITIONS.html) of the `${CMAKE_CURRENT_SOURCE_DIR}` directory (https://cmake.org/cmake/help/latest/variable/CMAKE_CURRENT_SOURCE_DIR.html)
* `add_module` - "create a kernel module target"
* `function(add_module module_name module_files kernel_dir)`
* `module_name` - name of the module and target
* `module_files` - the source and object files of the moudles
* `kernel_dir` - path to kernelt build enviroment
With this cmake module the user can build/create/describe kernel modules in a CMakeLists.txt, in the way liwe a usespace executable or lib. E.g. see the CMakeLists.txt in example folder.