aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-09-03 19:34:59 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-09-03 19:36:52 +0200
commitc818aa8a02d2809b3189a1fdbec580fd59d22ce2 (patch)
treeab37a6959f7e63ce8ef70a338bef20a4ac6dbd3f
parent387c97bae8fd2e21dcd5b0a2b938d23e5d007a0d (diff)
shuffle files
Moving all code into src/crepe allows you to add the src folder as SYSTEM INTERFACE, resulting in includes that look like `<crepe/xyz.h>`.
-rw-r--r--CMakeLists.txt16
-rw-r--r--Doxyfile4
-rw-r--r--lazy.mk3
-rw-r--r--makefile4
-rw-r--r--readme.md8
-rw-r--r--src/CMakeLists.txt16
-rw-r--r--src/crepe/CMakeLists.txt3
-rw-r--r--src/crepe/main.cpp (renamed from main.cpp)0
-rw-r--r--src/makefile2
9 files changed, 33 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index c8b3991..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-cmake_minimum_required(VERSION 3.28)
-
-set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
-
-# # enable debug features
-# set(CMAKE_BUILD_TYPE Debug)
-# add_compile_definitions(DEBUG)
-
-project(main C CXX)
-
-add_executable(main
- main.cpp
-)
-
diff --git a/Doxyfile b/Doxyfile
index 08a0b9b..8ba90fc 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,9 +1,9 @@
# Doxyfile 1.11.0
DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = "WIP"
+PROJECT_NAME = "crepe"
OUTPUT_DIRECTORY = doxygen
-INPUT += .
+INPUT += src
EXCLUDE_PATTERNS = build
EXCLUDE_SYMLINKS = YES
diff --git a/lazy.mk b/lazy.mk
index 8684332..a591fd5 100644
--- a/lazy.mk
+++ b/lazy.mk
@@ -5,8 +5,9 @@
BUILD_DIR ?= build
TARGET ?= $(BUILD_DIR)/main
-# make cmake shut up
+# always generate fresh build rules when cmake is re-run
CMFLAGS += --fresh
+# make cmake shut up
CMFLAGS += --log-level WARNING
CMFLAGS += -Wno-deprecated
diff --git a/makefile b/makefile
index 88af4e6..3792250 100644
--- a/makefile
+++ b/makefile
@@ -5,11 +5,9 @@ all: $(TARGET) # TARGET is defined in lazy.mk (build/main)
doxygen: Doxyfile FORCE
doxygen
-FMT += $(shell git ls-files '*.h' '*.c' '*.cpp')
+FMT += $(shell git ls-files '*.c' '*.cpp' '*.h' '*.hpp')
format: FORCE
clang-format -i $(FMT)
# clang tidy doesn't work that well :/
# clang-tidy --fix-errors $(FMT)
-include lazy.mk
-
diff --git a/readme.md b/readme.md
index 6568bce..c6e51ec 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,10 @@
-# engine
+# crêpe
+systems programming in c++ minor engine
+# TODO
+
+- add lib/ folder for libraries (as submodules)
+- add test/ folder + googletest for unit testing
+- add mwe/ folder for experiments and proof-of-concept toys
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..3ade1e3
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.28)
+
+set(CMAKE_C_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+
+# enable debug features
+set(CMAKE_BUILD_TYPE Debug)
+add_compile_definitions(DEBUG)
+
+project(crepe C CXX)
+
+add_executable(main)
+
+add_subdirectory(crepe)
+
diff --git a/src/crepe/CMakeLists.txt b/src/crepe/CMakeLists.txt
new file mode 100644
index 0000000..392b7d7
--- /dev/null
+++ b/src/crepe/CMakeLists.txt
@@ -0,0 +1,3 @@
+target_sources(main PUBLIC
+ main.cpp
+)
diff --git a/main.cpp b/src/crepe/main.cpp
index 8e9a184..8e9a184 100644
--- a/main.cpp
+++ b/src/crepe/main.cpp
diff --git a/src/makefile b/src/makefile
new file mode 100644
index 0000000..8352615
--- /dev/null
+++ b/src/makefile
@@ -0,0 +1,2 @@
+include ../lazy.mk
+