diff options
-rw-r--r-- | .gitmodules | 5 | ||||
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | docs/.gitignore | 1 | ||||
-rw-r--r-- | docs/class-diag.puml | 8 | ||||
-rw-r--r-- | docs/makefile | 8 | ||||
-rw-r--r-- | lazy.mk | 33 | ||||
m--------- | lib/SDL | 0 | ||||
-rw-r--r-- | license | 21 | ||||
-rw-r--r-- | main.cpp | 4 |
9 files changed, 93 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8c7dbb0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,5 @@ +[submodule "lib/SDL"] + path = lib/SDL + url = https://github.com/libsdl-org/SDL + branch = release-2.30.x + shallow = true diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e4f76a5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.28) + +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) +set(CMAKE_BUILD_TYPE Debug) + +project(main C CXX) + +add_executable(main + main.cpp +) + diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..756b22f --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +*.svg diff --git a/docs/class-diag.puml b/docs/class-diag.puml new file mode 100644 index 0000000..7db3bd3 --- /dev/null +++ b/docs/class-diag.puml @@ -0,0 +1,8 @@ +@startuml + +!theme plain +skinparam linetype ortho +skinparam classAttributeIconSize 0 + + +@enduml diff --git a/docs/makefile b/docs/makefile new file mode 100644 index 0000000..0bbe6e1 --- /dev/null +++ b/docs/makefile @@ -0,0 +1,8 @@ +all: class-diag.svg + +%.svg: %.puml + plantuml -tsvg $< + +clean: + git clean -fxdi + @@ -0,0 +1,33 @@ +# NOTE: CMAKE IS THE PRIMARY BUILD SYSTEM FOR THIS PROJECT. THIS FILE IS +# PROVIDED PURELY FOR CONVENIENCE, AND SHOULD NOT BECOME AN ESSENTIAL PART OF +# THE BUILD SYSTEM! + +BUILD_DIR ?= build +TARGET ?= $(BUILD_DIR)/main + +# always generate fresh build rules when cmake is re-run +CMFLAGS += --fresh +# make cmake shut up +CMFLAGS += --log-level WARNING +CMFLAGS += -Wno-deprecated + +.PHONY: FORCE + +all: FORCE $(TARGET) + +$(BUILD_DIR)/build.ninja: CMakeLists.txt + @mkdir -p $(BUILD_DIR) + @cmake -B $(BUILD_DIR) -G Ninja $(CMFLAGS) + +$(TARGET): $(BUILD_DIR)/build.ninja FORCE + @ninja -C $(BUILD_DIR) + +clean: FORCE + $(RM) -r $(BUILD_DIR) + +# Forward any unknown targets to Ninja +ifneq ($(MAKECMDGOALS),) +%:: + @ninja -C $(BUILD_DIR) $@ +endif + diff --git a/lib/SDL b/lib/SDL new file mode 160000 +Subproject e9efcfb428c6cf4ee49b249fb099981445685e0 @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Loek Le Blansch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..1846bfb --- /dev/null +++ b/main.cpp @@ -0,0 +1,4 @@ +int main() { + return 0; +} + |