From be0439448eb695979e877a0c1cb064369049faad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:51:52 +0000 Subject: [PATCH] Fix CMake build system to work properly Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- CMakeLists.txt | 24 +- cmake-build/Makefile | 382 ++++++++++++++ .../Testing/Temporary/CTestCostData.txt | 2 + cmake-build/bin/test_bootloader | Bin 0 -> 16016 bytes cmake-build/bootloader/Makefile | 272 ++++++++++ cmake-build/kernel/Makefile | 488 ++++++++++++++++++ cmake-build/tests/Makefile | 257 +++++++++ kernel/CMakeLists.txt | 2 + 8 files changed, 1422 insertions(+), 5 deletions(-) create mode 100644 cmake-build/Makefile create mode 100644 cmake-build/Testing/Temporary/CTestCostData.txt create mode 100755 cmake-build/bin/test_bootloader create mode 100644 cmake-build/bootloader/Makefile create mode 100644 cmake-build/kernel/Makefile create mode 100644 cmake-build/tests/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index d152d2f..0888c4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,9 +53,9 @@ endif() # Custom target to create bootable image find_program(MFORMAT mformat) find_program(MCOPY mcopy) -find_program(MDD mdd) +find_program(MMD mmd) -if(MFORMAT AND MCOPY) +if(MFORMAT AND MCOPY AND MMD) add_custom_target(image COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/build/iso/EFI/BOOT COMMAND ${CMAKE_COMMAND} -E copy @@ -65,10 +65,10 @@ if(MFORMAT AND MCOPY) ${CMAKE_BINARY_DIR}/kernel/metalos.bin ${CMAKE_BINARY_DIR}/build/iso/ COMMAND ${CMAKE_COMMAND} -E echo "Creating disk image..." - COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/build/metalos.img bs=1M count=64 2>/dev/null + COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/build/metalos.img bs=1M count=64 COMMAND ${MFORMAT} -i ${CMAKE_BINARY_DIR}/build/metalos.img -F -v METALOS :: - COMMAND ${MDD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI - COMMAND ${MDD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI/BOOT + COMMAND ${MMD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI + COMMAND ${MMD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI/BOOT COMMAND ${MCOPY} -i ${CMAKE_BINARY_DIR}/build/metalos.img ${CMAKE_BINARY_DIR}/build/iso/EFI/BOOT/bootx64.efi ::/EFI/BOOT/ COMMAND ${MCOPY} -i ${CMAKE_BINARY_DIR}/build/metalos.img @@ -143,6 +143,20 @@ if(QEMU) COMMENT "Running MetalOS in QEMU with GDB server (port 1234)" VERBATIM ) + + add_custom_target(qemu-uefi-test + COMMAND ${CMAKE_COMMAND} -E echo "Testing QEMU UEFI boot (no OS image)..." + COMMAND ${CMAKE_COMMAND} -E echo "Using OVMF firmware: ${OVMF_FIRMWARE}" + COMMAND ${CMAKE_COMMAND} -E echo "This will boot to UEFI shell in nographic mode." + COMMAND ${CMAKE_COMMAND} -E echo "You should see UEFI boot messages. Press Ctrl-A then X to exit QEMU." + COMMAND ${QEMU} + -drive if=pflash,format=raw,readonly=on,file=${OVMF_FIRMWARE} + -m 512M + -nographic + -net none + COMMENT "Testing QEMU UEFI setup without OS image" + VERBATIM + ) else() message(WARNING "OVMF firmware not found - QEMU targets will not be available") endif() diff --git a/cmake-build/Makefile b/cmake-build/Makefile new file mode 100644 index 0000000..b6e39ff --- /dev/null +++ b/cmake-build/Makefile @@ -0,0 +1,382 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build//CMakeFiles/progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named image + +# Build rule for target. +image: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 image +.PHONY : image + +# fast build rule for target. +image/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/image.dir/build.make CMakeFiles/image.dir/build +.PHONY : image/fast + +#============================================================================= +# Target rules for targets named qemu + +# Build rule for target. +qemu: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu +.PHONY : qemu + +# fast build rule for target. +qemu/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu.dir/build.make CMakeFiles/qemu.dir/build +.PHONY : qemu/fast + +#============================================================================= +# Target rules for targets named qemu-debug + +# Build rule for target. +qemu-debug: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-debug +.PHONY : qemu-debug + +# fast build rule for target. +qemu-debug/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-debug.dir/build.make CMakeFiles/qemu-debug.dir/build +.PHONY : qemu-debug/fast + +#============================================================================= +# Target rules for targets named qemu-gdb + +# Build rule for target. +qemu-gdb: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-gdb +.PHONY : qemu-gdb + +# fast build rule for target. +qemu-gdb/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-gdb.dir/build.make CMakeFiles/qemu-gdb.dir/build +.PHONY : qemu-gdb/fast + +#============================================================================= +# Target rules for targets named qemu-uefi-test + +# Build rule for target. +qemu-uefi-test: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-uefi-test +.PHONY : qemu-uefi-test + +# fast build rule for target. +qemu-uefi-test/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-uefi-test.dir/build.make CMakeFiles/qemu-uefi-test.dir/build +.PHONY : qemu-uefi-test/fast + +#============================================================================= +# Target rules for targets named bootloader_obj + +# Build rule for target. +bootloader_obj: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_obj +.PHONY : bootloader_obj + +# fast build rule for target. +bootloader_obj/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build +.PHONY : bootloader_obj/fast + +#============================================================================= +# Target rules for targets named bootloader_so + +# Build rule for target. +bootloader_so: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_so +.PHONY : bootloader_so + +# fast build rule for target. +bootloader_so/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build +.PHONY : bootloader_so/fast + +#============================================================================= +# Target rules for targets named bootloader_efi + +# Build rule for target. +bootloader_efi: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_efi +.PHONY : bootloader_efi + +# fast build rule for target. +bootloader_efi/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build +.PHONY : bootloader_efi/fast + +#============================================================================= +# Target rules for targets named kernel_obj + +# Build rule for target. +kernel_obj: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_obj +.PHONY : kernel_obj + +# fast build rule for target. +kernel_obj/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build +.PHONY : kernel_obj/fast + +#============================================================================= +# Target rules for targets named kernel_elf + +# Build rule for target. +kernel_elf: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_elf +.PHONY : kernel_elf + +# fast build rule for target. +kernel_elf/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build +.PHONY : kernel_elf/fast + +#============================================================================= +# Target rules for targets named kernel_bin + +# Build rule for target. +kernel_bin: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_bin +.PHONY : kernel_bin + +# fast build rule for target. +kernel_bin/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build +.PHONY : kernel_bin/fast + +#============================================================================= +# Target rules for targets named test_bootloader + +# Build rule for target. +test_bootloader: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 test_bootloader +.PHONY : test_bootloader + +# fast build rule for target. +test_bootloader/fast: + $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build +.PHONY : test_bootloader/fast + +#============================================================================= +# Target rules for targets named run_tests + +# Build rule for target. +run_tests: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 run_tests +.PHONY : run_tests + +# fast build rule for target. +run_tests/fast: + $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build +.PHONY : run_tests/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... bootloader_efi" + @echo "... image" + @echo "... kernel_bin" + @echo "... qemu" + @echo "... qemu-debug" + @echo "... qemu-gdb" + @echo "... qemu-uefi-test" + @echo "... run_tests" + @echo "... bootloader_obj" + @echo "... bootloader_so" + @echo "... kernel_elf" + @echo "... kernel_obj" + @echo "... test_bootloader" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/Testing/Temporary/CTestCostData.txt b/cmake-build/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..eac3007 --- /dev/null +++ b/cmake-build/Testing/Temporary/CTestCostData.txt @@ -0,0 +1,2 @@ +test_bootloader 1 0.00139881 +--- diff --git a/cmake-build/bin/test_bootloader b/cmake-build/bin/test_bootloader new file mode 100755 index 0000000000000000000000000000000000000000..4bb7874d74392aad1d688491918b6149b54dbb4b GIT binary patch literal 16016 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 literal 0 HcmV?d00001 diff --git a/cmake-build/bootloader/Makefile b/cmake-build/bootloader/Makefile new file mode 100644 index 0000000..afd0805 --- /dev/null +++ b/cmake-build/bootloader/Makefile @@ -0,0 +1,272 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/bootloader//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_obj.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_obj.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_obj.dir/rule + +# Convenience name for target. +bootloader_obj: bootloader/CMakeFiles/bootloader_obj.dir/rule +.PHONY : bootloader_obj + +# fast build rule for target. +bootloader_obj/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build +.PHONY : bootloader_obj/fast + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_so.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_so.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_so.dir/rule + +# Convenience name for target. +bootloader_so: bootloader/CMakeFiles/bootloader_so.dir/rule +.PHONY : bootloader_so + +# fast build rule for target. +bootloader_so/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build +.PHONY : bootloader_so/fast + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_efi.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_efi.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_efi.dir/rule + +# Convenience name for target. +bootloader_efi: bootloader/CMakeFiles/bootloader_efi.dir/rule +.PHONY : bootloader_efi + +# fast build rule for target. +bootloader_efi/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build +.PHONY : bootloader_efi/fast + +src/main.o: src/main.c.o +.PHONY : src/main.o + +# target to build an object file +src/main.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.o +.PHONY : src/main.c.o + +src/main.i: src/main.c.i +.PHONY : src/main.i + +# target to preprocess a source file +src/main.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.i +.PHONY : src/main.c.i + +src/main.s: src/main.c.s +.PHONY : src/main.s + +# target to generate assembly for a file +src/main.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.s +.PHONY : src/main.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... bootloader_efi" + @echo "... bootloader_obj" + @echo "... bootloader_so" + @echo "... src/main.o" + @echo "... src/main.i" + @echo "... src/main.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/kernel/Makefile b/cmake-build/kernel/Makefile new file mode 100644 index 0000000..fe8c89d --- /dev/null +++ b/cmake-build/kernel/Makefile @@ -0,0 +1,488 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/kernel//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +kernel/CMakeFiles/kernel_obj.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_obj.dir/rule +.PHONY : kernel/CMakeFiles/kernel_obj.dir/rule + +# Convenience name for target. +kernel_obj: kernel/CMakeFiles/kernel_obj.dir/rule +.PHONY : kernel_obj + +# fast build rule for target. +kernel_obj/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build +.PHONY : kernel_obj/fast + +# Convenience name for target. +kernel/CMakeFiles/kernel_elf.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_elf.dir/rule +.PHONY : kernel/CMakeFiles/kernel_elf.dir/rule + +# Convenience name for target. +kernel_elf: kernel/CMakeFiles/kernel_elf.dir/rule +.PHONY : kernel_elf + +# fast build rule for target. +kernel_elf/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build +.PHONY : kernel_elf/fast + +# Convenience name for target. +kernel/CMakeFiles/kernel_bin.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_bin.dir/rule +.PHONY : kernel/CMakeFiles/kernel_bin.dir/rule + +# Convenience name for target. +kernel_bin: kernel/CMakeFiles/kernel_bin.dir/rule +.PHONY : kernel_bin + +# fast build rule for target. +kernel_bin/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build +.PHONY : kernel_bin/fast + +src/apic.o: src/apic.c.o +.PHONY : src/apic.o + +# target to build an object file +src/apic.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.o +.PHONY : src/apic.c.o + +src/apic.i: src/apic.c.i +.PHONY : src/apic.i + +# target to preprocess a source file +src/apic.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.i +.PHONY : src/apic.c.i + +src/apic.s: src/apic.c.s +.PHONY : src/apic.s + +# target to generate assembly for a file +src/apic.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.s +.PHONY : src/apic.c.s + +src/gdt.o: src/gdt.c.o +.PHONY : src/gdt.o + +# target to build an object file +src/gdt.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.o +.PHONY : src/gdt.c.o + +src/gdt.i: src/gdt.c.i +.PHONY : src/gdt.i + +# target to preprocess a source file +src/gdt.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.i +.PHONY : src/gdt.c.i + +src/gdt.s: src/gdt.c.s +.PHONY : src/gdt.s + +# target to generate assembly for a file +src/gdt.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.s +.PHONY : src/gdt.c.s + +src/interrupts.o: src/interrupts.c.o +.PHONY : src/interrupts.o + +# target to build an object file +src/interrupts.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.o +.PHONY : src/interrupts.c.o + +src/interrupts.i: src/interrupts.c.i +.PHONY : src/interrupts.i + +# target to preprocess a source file +src/interrupts.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.i +.PHONY : src/interrupts.c.i + +src/interrupts.s: src/interrupts.c.s +.PHONY : src/interrupts.s + +# target to generate assembly for a file +src/interrupts.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.s +.PHONY : src/interrupts.c.s + +src/main.o: src/main.c.o +.PHONY : src/main.o + +# target to build an object file +src/main.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.o +.PHONY : src/main.c.o + +src/main.i: src/main.c.i +.PHONY : src/main.i + +# target to preprocess a source file +src/main.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.i +.PHONY : src/main.c.i + +src/main.s: src/main.c.s +.PHONY : src/main.s + +# target to generate assembly for a file +src/main.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.s +.PHONY : src/main.c.s + +src/memory.o: src/memory.c.o +.PHONY : src/memory.o + +# target to build an object file +src/memory.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.o +.PHONY : src/memory.c.o + +src/memory.i: src/memory.c.i +.PHONY : src/memory.i + +# target to preprocess a source file +src/memory.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.i +.PHONY : src/memory.c.i + +src/memory.s: src/memory.c.s +.PHONY : src/memory.s + +# target to generate assembly for a file +src/memory.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.s +.PHONY : src/memory.c.s + +src/pci.o: src/pci.c.o +.PHONY : src/pci.o + +# target to build an object file +src/pci.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.o +.PHONY : src/pci.c.o + +src/pci.i: src/pci.c.i +.PHONY : src/pci.i + +# target to preprocess a source file +src/pci.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.i +.PHONY : src/pci.c.i + +src/pci.s: src/pci.c.s +.PHONY : src/pci.s + +# target to generate assembly for a file +src/pci.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.s +.PHONY : src/pci.c.s + +src/smp.o: src/smp.c.o +.PHONY : src/smp.o + +# target to build an object file +src/smp.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.o +.PHONY : src/smp.c.o + +src/smp.i: src/smp.c.i +.PHONY : src/smp.i + +# target to preprocess a source file +src/smp.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.i +.PHONY : src/smp.c.i + +src/smp.s: src/smp.c.s +.PHONY : src/smp.s + +# target to generate assembly for a file +src/smp.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.s +.PHONY : src/smp.c.s + +src/spinlock.o: src/spinlock.c.o +.PHONY : src/spinlock.o + +# target to build an object file +src/spinlock.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.o +.PHONY : src/spinlock.c.o + +src/spinlock.i: src/spinlock.c.i +.PHONY : src/spinlock.i + +# target to preprocess a source file +src/spinlock.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.i +.PHONY : src/spinlock.c.i + +src/spinlock.s: src/spinlock.c.s +.PHONY : src/spinlock.s + +# target to generate assembly for a file +src/spinlock.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.s +.PHONY : src/spinlock.c.s + +src/timer.o: src/timer.c.o +.PHONY : src/timer.o + +# target to build an object file +src/timer.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.o +.PHONY : src/timer.c.o + +src/timer.i: src/timer.c.i +.PHONY : src/timer.i + +# target to preprocess a source file +src/timer.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.i +.PHONY : src/timer.c.i + +src/timer.s: src/timer.c.s +.PHONY : src/timer.s + +# target to generate assembly for a file +src/timer.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.s +.PHONY : src/timer.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... kernel_bin" + @echo "... kernel_elf" + @echo "... kernel_obj" + @echo "... src/apic.o" + @echo "... src/apic.i" + @echo "... src/apic.s" + @echo "... src/gdt.o" + @echo "... src/gdt.i" + @echo "... src/gdt.s" + @echo "... src/interrupts.o" + @echo "... src/interrupts.i" + @echo "... src/interrupts.s" + @echo "... src/main.o" + @echo "... src/main.i" + @echo "... src/main.s" + @echo "... src/memory.o" + @echo "... src/memory.i" + @echo "... src/memory.s" + @echo "... src/pci.o" + @echo "... src/pci.i" + @echo "... src/pci.s" + @echo "... src/smp.o" + @echo "... src/smp.i" + @echo "... src/smp.s" + @echo "... src/spinlock.o" + @echo "... src/spinlock.i" + @echo "... src/spinlock.s" + @echo "... src/timer.o" + @echo "... src/timer.i" + @echo "... src/timer.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/tests/Makefile b/cmake-build/tests/Makefile new file mode 100644 index 0000000..59d62d7 --- /dev/null +++ b/cmake-build/tests/Makefile @@ -0,0 +1,257 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/tests//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +tests/CMakeFiles/test_bootloader.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/test_bootloader.dir/rule +.PHONY : tests/CMakeFiles/test_bootloader.dir/rule + +# Convenience name for target. +test_bootloader: tests/CMakeFiles/test_bootloader.dir/rule +.PHONY : test_bootloader + +# fast build rule for target. +test_bootloader/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build +.PHONY : test_bootloader/fast + +# Convenience name for target. +tests/CMakeFiles/run_tests.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/run_tests.dir/rule +.PHONY : tests/CMakeFiles/run_tests.dir/rule + +# Convenience name for target. +run_tests: tests/CMakeFiles/run_tests.dir/rule +.PHONY : run_tests + +# fast build rule for target. +run_tests/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build +.PHONY : run_tests/fast + +unit/test_bootloader.o: unit/test_bootloader.c.o +.PHONY : unit/test_bootloader.o + +# target to build an object file +unit/test_bootloader.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.o +.PHONY : unit/test_bootloader.c.o + +unit/test_bootloader.i: unit/test_bootloader.c.i +.PHONY : unit/test_bootloader.i + +# target to preprocess a source file +unit/test_bootloader.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.i +.PHONY : unit/test_bootloader.c.i + +unit/test_bootloader.s: unit/test_bootloader.c.s +.PHONY : unit/test_bootloader.s + +# target to generate assembly for a file +unit/test_bootloader.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.s +.PHONY : unit/test_bootloader.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... run_tests" + @echo "... test_bootloader" + @echo "... unit/test_bootloader.o" + @echo "... unit/test_bootloader.i" + @echo "... unit/test_bootloader.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 9c4d380..72e139d 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -63,9 +63,11 @@ add_executable(kernel_elf $ ${KERNEL_ASM_OBJECTS}) set_target_properties(kernel_elf PROPERTIES OUTPUT_NAME metalos.elf LINKER_LANGUAGE C + POSITION_INDEPENDENT_CODE OFF ) target_link_options(kernel_elf PRIVATE -nostdlib + -no-pie -T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld )