Public domain headers containing functions and data structures for rapid application development in C99 (or later).
| Library | Description |
|---|---|
| autil.h | General purpose utility functions and data structures |
| atest.h | Dead simple unit testing library |
| aengn.h | 2D game engine with pixel coordinates (SDL2 backend) |
See individual header files for usage instructions.
$ make check CFLAGS='$(C99_DBG)' # Debug
$ make check # Release$ make check CC=clang CFLAGS='$(GNU_DBG)' # Debug
$ make check CC=clang CFLAGS='$(GNU_DBG) $(SANITIZE)' # Debug with Address
# Sanitizer (glibc only)
$ make check CC=clang CFLAGS='$(GNU_REL)' # ReleaseApplications built using aengn.h link against SDL2, SDL2_image, and
SDL2_mixer for native builds and compile with Emscripten's emcc for web
builds. SDL2 and its extension libraries are provided by most package managers,
and can be installed on Debian-based distros with:
$ apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-devThe Emscripten toolchain can be downloaded and activated with:
$ git clone https://github.com/emscripten-core/emsdk.git
$ cd emsdk/
$ ./emsdk install latest # Download and install latest SDK (do this once)
$ ./emsdk activate latest # Make the latest SDK active (do this once)
$ source ./emsdk_env.sh # Setup envrionment (source this every time)$ make examples CFLAGS='$(C99_DBG)' # Debug (c99)
$ make examples # Release (c99)
$ make examples CC=clang CFLAGS='$(GNU_DBG)' # Debug (gcc/clang)
$ make examples CC=clang CFLAGS='$(GNU_REL)' # Release (gcc/clang)
$ make examples-web CFLAGS='$(GNU_DBG)' # Debug (emscripten)
$ make examples-web CFLAGS='$(GNU_REL)' # Release (emscripten)To run an example with the name example-name:
$ (cd examples/ && ./example-name)which will set the working directory to example/ for applications that load
assets via relative paths.
All content in this repository is licensed under the Zero-Clause BSD license.
See LICENSE for more information.