Skip to content
/ c-template Public template

A template for C programs with sane defaults and a custom build system. – MIRROR OF https://git.tjdev.de/thetek/c-template

License

Notifications You must be signed in to change notification settings

thetek42/c-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.