From 5f6e1d8a85988de603c507c0f0663c5349ba61ee Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 25 Aug 2026 03:32:58 +0200 Subject: setup: workspace and build system --- .gitignore | 21 +++++++++++++++++++++ premake5.lua | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.c | 6 ++++++ 3 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 premake5.lua create mode 100644 src/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b9812f --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +.clangd +compile_flags.txt +compile_commands.json + +*.log +imgui.ini +.DS_Store + +bin/ +bin-int/ + +.vs/ +.vscode/ + +*.make +Makefile + +*.sln +*.vcxproj +*.vcxproj.* + diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..79c1165 --- /dev/null +++ b/premake5.lua @@ -0,0 +1,59 @@ +workspace "icsohs" + architecture "x64" + startproject "icsohs" + multiprocessorcompile "On" + + configurations + { + "debug", + "release", + "dist", + } + + filter "system:windows" + defines "ICSOHS_WINDOWS" + filter "system:linux" + defines "ICSOHS_LINUX" + filter "system:macosx" + defines "ICSOHS_MACOS" + architecture "ARM64" + +local outputdir = "%{cfg.buildcfg}-%{cfg.system}/%{prj.name}" + +project "icsohs" + kind "ConsoleApp" + language "C" + staticruntime "on" + externalwarnings "Off" + + targetdir ("bin/" .. outputdir) + objdir ("bin-int/" .. outputdir) + + defines + { + "_CRT_SECURE_NO_WARNINGS", + } + + files + { + "src/**.h", + "src/**.c", + } + + includedirs "src" + + filter "system:windows" + systemversion "latest" + + filter "configurations:debug" + defines "ICSOHS_DEBUG" + runtime "Debug" + symbols "On" + filter "configurations:release" + defines "ICSOHS_RELEASE" + runtime "Release" + optimize "On" + filter "configurations:dist" + defines "ICSOHS_DIST" + runtime "Release" + optimize "On" diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..902e18a --- /dev/null +++ b/src/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) +{ + puts("type shi"); +} -- cgit v1.3