diff options
| author | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-03-27 14:03:55 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-03-27 14:03:55 +0700 |
| commit | 6ffe96d1e3f0289c2070e050cf8e1a30288e6d91 (patch) | |
| tree | 746485cfc0f55dad82d1d0daad9677bf63475cba /drivers | |
| parent | a4dea4148157a94a9143dbbd92fdd88b4358676c (diff) | |
Cmake build generator support: build stage
Multi-target architecture implementation:
each root source code directory presents the one
*INTERFACE* target to it's subdirectory subtargets
that link only as *STATIC* library.
For instance, *arch* directory presents *Architecture* target
then *Architecture* target has *CPUID*, *IO*, *PORT*
and etc. dependencies
Exact order of linking targets is: boot.o CRTIBUNDLE <TARGETS> CRTNBUNDLE.
Sequence destruction cause to UB. Please to pay attention to this.
TODO
- Debug information
- Build type
- Toolchain file
- Image creation
- Build by WinGW compiler on Windows platform (optional)
Signed-off-by: Alexey Gavrilov <alexey.gavrilov@mail.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | drivers/acpi/Acpi.h | 2 | ||||
| -rw-r--r-- | drivers/acpi/CMakeLists.txt | 17 | ||||
| -rw-r--r-- | drivers/acpi/Ics.h | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt new file mode 100644 index 0000000..c11b75f --- /dev/null +++ b/drivers/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(Drivers INTERFACE) + +add_subdirectory(acpi) diff --git a/drivers/acpi/Acpi.h b/drivers/acpi/Acpi.h index 506ab99..d9dc378 100644 --- a/drivers/acpi/Acpi.h +++ b/drivers/acpi/Acpi.h @@ -1,4 +1,4 @@ -#include <types.h> +#include <Types.h> #include <StringOperations.h> #include "Ics.h" diff --git a/drivers/acpi/CMakeLists.txt b/drivers/acpi/CMakeLists.txt new file mode 100644 index 0000000..32f2fac --- /dev/null +++ b/drivers/acpi/CMakeLists.txt @@ -0,0 +1,17 @@ +add_library(ACPI STATIC) +target_link_libraries(ACPI PUBLIC CXX_COMPILER_REQUIREMENTS) + +target_sources(ACPI PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/Acpi.cpp + ${CMAKE_CURRENT_LIST_DIR}/Ics.cpp +) + +target_sources(ACPI + PUBLIC + FILE_SET HEADERS + FILES + ${CMAKE_CURRENT_LIST_DIR}/Acpi.h + ${CMAKE_CURRENT_LIST_DIR}/Ics.h +) + +target_link_libraries(Drivers INTERFACE ACPI) diff --git a/drivers/acpi/Ics.h b/drivers/acpi/Ics.h index 8289c90..b4e38d4 100644 --- a/drivers/acpi/Ics.h +++ b/drivers/acpi/Ics.h @@ -1,4 +1,4 @@ -#include <types.h> +#include <Types.h> class Ics |
