From 043fea60920ca91872fc6bf770d0796e9e8dfe90 Mon Sep 17 00:00:00 2001 From: anth64 Date: Mon, 2 Feb 2026 22:52:44 +0100 Subject: [PATCH] fix(install): install headers to stk/ subdirectory for proper namespacing - Install headers to /include/stk/ instead of /include/ - Update README examples to use #include - Update Windows install instructions to reflect stk/ directory structure - Add MPL-2.0 license badge to README - Clarify DLL can be placed in binary or lib directory on Windows This prevents header name collisions with other libraries and follows standard library distribution conventions (similar to SDL). Users now include stk headers as rather than . --- README.md | 8 +++++--- bmake.mk | 8 +++++--- gmake.mk | 11 +++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c524448..a98447e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # stk (Stalwart Toolkit) +[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) + `stk` is a lightweight, modular toolkit for building games and game engines. It provides a **portable foundation** for dynamically loading modules, native or WASM, without enforcing any architecture or design choices. It is designed to run on modern systems running POSIX and Windows using C89. @@ -53,7 +55,7 @@ sudo ./build.sh PREFIX=$HOME/.local install ``` build.bat release ``` -* Once finished building, copy `include/stk.h` and `bin/release/stk.dll` to your project directory. +* Once finished building, copy the headers from `include/` to `your_project/include/stk/` and `bin/release/stk.dll` to your project's lib directory. --- @@ -62,7 +64,7 @@ build.bat release ### Basic Example ```c -#include +#include #include int main(void) @@ -197,7 +199,7 @@ Run the included test suite: build.bat test # Windows ``` -The test will watch the `modules/` directory and report when modules are loaded, reloaded, or unloaded. +The test will watch the `mods/` directory and report when modules are loaded, reloaded, or unloaded. --- diff --git a/bmake.mk b/bmake.mk index 16b36de..5d05b21 100644 --- a/bmake.mk +++ b/bmake.mk @@ -58,10 +58,12 @@ test: debug cd ${.CURDIR}/test && ${MAKE} -f bmake.mk install: release - install -d ${LIBDIR} ${INCDIR} + install -d ${LIBDIR} ${INCDIR}/stk install -m 755 ${.CURDIR}/${BIN_DIR}/release/${FULL_LIB} ${LIBDIR}/ - install -m 644 ${.CURDIR}/${INC_DIR}/stk.h ${INCDIR}/ + install -m 644 ${.CURDIR}/${INC_DIR}/stk.h ${INCDIR}/stk/ + install -m 644 ${.CURDIR}/${INC_DIR}/stk_version.h ${INCDIR}/stk/ + install -m 644 ${.CURDIR}/${INC_DIR}/stk_log.h ${INCDIR}/stk/ uninstall: rm -f ${LIBDIR}/${FULL_LIB} - rm -f ${INCDIR}/stk.h + rm -rf ${INCDIR}/stk diff --git a/gmake.mk b/gmake.mk index 40bffa3..7866a8c 100644 --- a/gmake.mk +++ b/gmake.mk @@ -61,17 +61,20 @@ test: debug # Installation (Unix only) ifneq ($(OS),Windows_NT) install: release - install -d $(LIBDIR) $(INCDIR) + install -d $(LIBDIR) $(INCDIR)/stk install -m 755 $(BIN_DIR)/release/$(FULL_LIB) $(LIBDIR)/ - install -m 644 $(INC_DIR)/stk.h $(INCDIR)/ + install -m 644 $(INC_DIR)/stk.h $(INCDIR)/stk/ + install -m 644 $(INC_DIR)/stk_version.h $(INCDIR)/stk/ + install -m 644 $(INC_DIR)/stk_log.h $(INCDIR)/stk/ uninstall: rm -f $(LIBDIR)/$(FULL_LIB) - rm -f $(INCDIR)/stk.h + rm -rf $(INCDIR)/stk else install: @echo "make install is not supported on Windows." - @echo "Copy include/stk.h and bin/release/stk.dll to your project." + @echo "Copy include/ directory contents to your_project/include/stk/" + @echo "Copy bin/release/stk.dll to your project's lib directory." uninstall: @echo "make uninstall is not supported on Windows."