From 94873df8fe7b94492250957a15351c72736fb818 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Sun, 15 Sep 2024 07:52:25 +0200 Subject: [PATCH] fixing windows build x3 | replacing compile commands by compile flags --- compile_commands.json | 812 ------------------ compile_flags.txt | 12 + runtime/Includes/PreCompiled.h | 8 + runtime/Sources/Renderer/Memory.cpp | 12 +- runtime/Sources/Renderer/RenderCore.cpp | 5 +- .../Sources/Renderer/Vulkan/VulkanLoader.h | 2 - xmake.lua | 19 +- 7 files changed, 45 insertions(+), 825 deletions(-) delete mode 100644 compile_commands.json create mode 100644 compile_flags.txt diff --git a/compile_commands.json b/compile_commands.json deleted file mode 100644 index e9651ae..0000000 --- a/compile_commands.json +++ /dev/null @@ -1,812 +0,0 @@ -[ - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Application.o", - "runtime/Sources/Core/Application.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Application.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Application.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Bridge.o", - "runtime/Sources/Core/Bridge.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Bridge.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Bridge.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/EventBus.o", - "runtime/Sources/Core/EventBus.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/EventBus.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/EventBus.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/EventListener.o", - "runtime/Sources/Core/EventListener.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/EventListener.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/EventListener.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Fps.o", - "runtime/Sources/Core/Fps.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Fps.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Fps.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Graphics.o", - "runtime/Sources/Core/Graphics.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Graphics.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Graphics.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Logs.o", - "runtime/Sources/Core/Logs.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Logs.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Logs.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Memory.o", - "runtime/Sources/Core/Memory.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Memory.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Memory.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/Profiler.o", - "runtime/Sources/Core/Profiler.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/Profiler.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/Profiler.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/SDLManager.o", - "runtime/Sources/Core/SDLManager.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/SDLManager.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/SDLManager.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Core/UUID.o", - "runtime/Sources/Core/UUID.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Core/UUID.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Core/UUID.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Graphics/Mesh.o", - "runtime/Sources/Graphics/Mesh.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Graphics/Mesh.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Graphics/Mesh.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Graphics/PixelPutManager.o", - "runtime/Sources/Graphics/PixelPutManager.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Graphics/PixelPutManager.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Graphics/PixelPutManager.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Graphics/Scene.o", - "runtime/Sources/Graphics/Scene.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Graphics/Scene.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Graphics/Scene.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Graphics/Sprite.o", - "runtime/Sources/Graphics/Sprite.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Graphics/Sprite.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Graphics/Sprite.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Platform/Inputs.o", - "runtime/Sources/Platform/Inputs.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Platform/Inputs.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Platform/Inputs.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Platform/Window.o", - "runtime/Sources/Platform/Window.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Platform/Window.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Platform/Window.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Buffer.o", - "runtime/Sources/Renderer/Buffer.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Buffer.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Buffer.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Descriptor.o", - "runtime/Sources/Renderer/Descriptor.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Descriptor.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Descriptor.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Image.o", - "runtime/Sources/Renderer/Image.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Image.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Image.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Memory.o", - "runtime/Sources/Renderer/Memory.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Memory.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Memory.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/RenderCore.o", - "runtime/Sources/Renderer/RenderCore.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/RenderCore.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/RenderCore.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Renderer.o", - "runtime/Sources/Renderer/Renderer.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Renderer.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Renderer.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/SceneRenderer.o", - "runtime/Sources/Renderer/SceneRenderer.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/SceneRenderer.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/SceneRenderer.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Pipelines/Graphics.o", - "runtime/Sources/Renderer/Pipelines/Graphics.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Pipelines/Graphics.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Pipelines/Graphics.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Pipelines/Shader.o", - "runtime/Sources/Renderer/Pipelines/Shader.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Pipelines/Shader.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Pipelines/Shader.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/RenderPasses/2DPass.o", - "runtime/Sources/Renderer/RenderPasses/2DPass.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/RenderPasses/2DPass.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/RenderPasses/2DPass.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/RenderPasses/FinalPass.o", - "runtime/Sources/Renderer/RenderPasses/FinalPass.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/RenderPasses/FinalPass.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/RenderPasses/FinalPass.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/RenderPasses/Passes.o", - "runtime/Sources/Renderer/RenderPasses/Passes.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/RenderPasses/Passes.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/RenderPasses/Passes.o" - }, - { - "arguments": [ - "/usr/bin/clang++", - "-std=c++20", - "-O3", - "-fPIC", - "-Wall", - "-Wextra", - "-DSDL_MAIN_HANDLED", - "-Wno-error=", - "-g3", - "-D", - "DEBUG", - "-DIMAGE_OPTIMIZED", - "-I./includes", - "-I./runtime/Includes", - "-I./runtime/Sources", - "-I./third_party", - "-c", - "-o", - "objs/make/linux/runtime/Sources/Renderer/Vulkan/VulkanLoader.o", - "runtime/Sources/Renderer/Vulkan/VulkanLoader.cpp" - ], - "directory": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX", - "file": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/runtime/Sources/Renderer/Vulkan/VulkanLoader.cpp", - "output": "/home/kbz8/Documents/Code/42/Other/MacroLibX/MacroLibX/objs/make/linux/runtime/Sources/Renderer/Vulkan/VulkanLoader.o" - } -] diff --git a/compile_flags.txt b/compile_flags.txt new file mode 100644 index 0000000..00cbbea --- /dev/null +++ b/compile_flags.txt @@ -0,0 +1,12 @@ +-xc++ +-std=c++20 +-Iruntime/Includes +-Iruntime/Sources +-Iincludes +-Ithird_party +-DMLX_BUILD +-DSDL_MAIN_HANDLED +-DDEBUG +-DIMAGE_OPTIMIZED +-D_REENTRANT +-isystem/usr/include/SDL2 diff --git a/runtime/Includes/PreCompiled.h b/runtime/Includes/PreCompiled.h index 71dfc71..243e128 100644 --- a/runtime/Includes/PreCompiled.h +++ b/runtime/Includes/PreCompiled.h @@ -47,6 +47,11 @@ #include // sincos #endif +#define VMA_STATIC_VULKAN_FUNCTIONS 0 +#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0 +#define VMA_VULKAN_VERSION 1000000 +#define VMA_ASSERT(expr) ((void)0) + #ifdef MLX_COMPILER_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" @@ -69,6 +74,9 @@ #include #include +#ifdef DEBUG + #define KVF_ENABLE_VALIDATION_LAYERS +#endif #include #include diff --git a/runtime/Sources/Renderer/Memory.cpp b/runtime/Sources/Renderer/Memory.cpp index 4b22069..7812525 100644 --- a/runtime/Sources/Renderer/Memory.cpp +++ b/runtime/Sources/Renderer/Memory.cpp @@ -1,15 +1,11 @@ #include +#include -#define VMA_STATIC_VULKAN_FUNCTIONS 0 -#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0 -#define VMA_VULKAN_VERSION 1000000 -#define VMA_ASSERT(expr) ((void)0) #define VMA_IMPLEMENTATION - #ifdef MLX_COMPILER_CLANG #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" - #include + #include #pragma clang diagnostic pop #elif defined(MLX_COMPILER_GCC) #pragma GCC diagnostic push @@ -18,10 +14,10 @@ #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wparentheses" - #include + #include #pragma GCC diagnostic pop #else - #include + #include #endif #include diff --git a/runtime/Sources/Renderer/RenderCore.cpp b/runtime/Sources/Renderer/RenderCore.cpp index 80ca9da..989f138 100644 --- a/runtime/Sources/Renderer/RenderCore.cpp +++ b/runtime/Sources/Renderer/RenderCore.cpp @@ -1,8 +1,11 @@ +#include + #define KVF_IMPLEMENTATION #ifdef DEBUG #define KVF_ENABLE_VALIDATION_LAYERS #endif -#include + +#include #include #include diff --git a/runtime/Sources/Renderer/Vulkan/VulkanLoader.h b/runtime/Sources/Renderer/Vulkan/VulkanLoader.h index 2d2f320..73e073b 100644 --- a/runtime/Sources/Renderer/Vulkan/VulkanLoader.h +++ b/runtime/Sources/Renderer/Vulkan/VulkanLoader.h @@ -14,8 +14,6 @@ #else typedef int (__stdcall* FARPROC)(void); #endif -#else - #include #endif namespace mlx diff --git a/xmake.lua b/xmake.lua index 59e4fe5..fb8e175 100644 --- a/xmake.lua +++ b/xmake.lua @@ -1,6 +1,6 @@ -- Global settings -add_requires("libsdl", { configs = { sdlmain = false }}) +add_requires("libsdl", { configs = { sdlmain = false } }) add_rules("mode.debug", "mode.release") set_languages("cxx20", "c99") @@ -61,7 +61,22 @@ target("mlx") if is_mode("debug") then add_defines("DEBUG") end -target_end() -- optional but I think the code is cleaner with this -- optional but I think the code is cleaner with this + + on_clean(function(target) + if target:objectfiles() then + for _, file in ipairs(target:objectfiles()) do + if os.exists(file) then + print("Removing " .. file) + os.rm(file) + end + end + end + if target:targetfile() and os.exists(target:targetfile()) then + print("Removing " .. target:targetfile()) + os.rm(target:targetfile()) + end + end) +target_end() target("Test") set_default(false)