aboutsummaryrefslogtreecommitdiff
path: root/source/boot
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2023-10-07 11:31:42 +0200
committerFelix Morgner <felix.morgner@ost.ch>2023-10-07 11:31:42 +0200
commit0942321b4f09db58927dcd56940785567e19db92 (patch)
tree496fa2db10dff18ae54c973592ee6d273877d2d0 /source/boot
parent090ba239c5c71c765706019fa2733ed2b28ece8f (diff)
downloadteachos-0942321b4f09db58927dcd56940785567e19db92.tar.xz
teachos-0942321b4f09db58927dcd56940785567e19db92.zip
build: perform cleaner split for platform settings
Diffstat (limited to 'source/boot')
-rw-r--r--source/boot/CMakeLists.txt15
-rw-r--r--source/boot/arch/x86_64/CMakeLists.txt4
2 files changed, 16 insertions, 3 deletions
diff --git a/source/boot/CMakeLists.txt b/source/boot/CMakeLists.txt
new file mode 100644
index 0000000..5591d70
--- /dev/null
+++ b/source/boot/CMakeLists.txt
@@ -0,0 +1,15 @@
+#[============================================================================[
+# Configure the generic settings for the bootstrapping library.
+#
+# All the settings (e.g. include paths, linker flags, etc.) applied in this
+# directly, are expected to be platform independent.
+#]============================================================================]
+
+add_library("_boot" STATIC)
+add_library("teachos::boot" ALIAS "_boot")
+
+#[============================================================================[
+# Apply the platform dependent settings to the bootstrapping library.
+#]============================================================================]
+
+add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}") \ No newline at end of file
diff --git a/source/boot/arch/x86_64/CMakeLists.txt b/source/boot/arch/x86_64/CMakeLists.txt
index 454f347..0fd6539 100644
--- a/source/boot/arch/x86_64/CMakeLists.txt
+++ b/source/boot/arch/x86_64/CMakeLists.txt
@@ -1,8 +1,6 @@
-add_library("boot" STATIC
+target_sources("_boot" PRIVATE
"src/boot.s"
"src/crti.s"
"src/crtn.s"
"src/multiboot.s"
)
-
-add_library("teachos::boot" ALIAS "boot") \ No newline at end of file