A template for C programs with sane defaults and a custom build system.
Go to file Use this template
thetek 2d4a7ec4ec feat: (u)intptr_t typedefs 2023-07-10 13:18:10 +02:00
build feat: help message 2023-06-24 10:37:32 +02:00
inc feat: (u)intptr_t typedefs 2023-07-10 13:18:10 +02:00
src style: add clang-format 2023-06-23 23:56:12 +02:00
test style: add clang-format 2023-06-23 23:56:12 +02:00
.ccls fix: update ccls options 2023-06-24 10:48:20 +02:00
.clang-format style: add clang-format 2023-06-23 23:56:12 +02:00
.gitignore init: ready, set, go! 2023-06-23 11:55:30 +02:00
LICENSE chore: license and readme 2023-06-24 10:35:06 +02:00
README.md fix: mention config.py in readme 2023-06-24 10:45:51 +02:00

README.md

C Template

A template for C programs. Its features include:

  • Sane defaults (especially compiler flags)
  • A custom build system written in Python
  • Simple custom testing framework
  • Formatting using clang-format
  • Common functions and typedefs included
  • Simple logging library

Usage

# debug build
build/build.py
build/build.py debug

# release build
build/build.py release

# run tests
build/build.py test

# format source files
build/build.py fmt

# clean build files
build/build.py clean

By default, source files are located in src/, header files are located in inc/ and anything used for testing goes in test/.

Compiler options, source folders and the target binary name can be changed in build/config.py.