A build system for C and C++ in one C header. https://includebuild.com
  • C 74.7%
  • PowerShell 10%
  • Shell 9.7%
  • HTML 3.3%
  • CSS 1.8%
  • Other 0.5%
Find a file
2026-03-11 11:50:27 -07:00
.github/workflows Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
examples Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
scripts Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
tests Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
www Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
.gitignore Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
build.h Release IncludeBuild v2 2026-03-11 11:50:27 -07:00
CONTRIBUTING.md Update license to CC0 1.0 Universal 2026-02-12 10:05:34 -07:00
LICENSE Switch to CC0 1.0 Universal license 2025-04-10 18:36:28 -07:00
README.md Release IncludeBuild v2 2026-03-11 11:50:27 -07:00

IncludeBuild

The header-only build system for C that just works.

IncludeBuild turns build systems inside out: your build system is now part of your code.

The Gist

  1. Copy build.h to your project.
  2. Create build.c:
#define INCLUDEBUILD_IMPLEMENTATION
#include "build.h"

int main(void) {
    ib_context* ctx = ib_context_create();
    ib_project* project = ib_project_create(ctx, ".");
    ib_target* target = ib_project_add_target(project, "app", IB_TARGET_EXECUTABLE);

    ib_target_set_entry(target, "main.c");
    ib_project_build(project, IB_MODE_DEBUG);

    ib_project_destroy(project);
    ib_context_destroy(ctx);
    return 0;
}
  1. Compile and run:
cc -o build build.c
./build

If your platform prefers a specific compiler, gcc and clang work too. V2 plans an explicit build graph, writes depfiles/manifests, and builds your target incrementally.

Why IncludeBuild?

vs Make/CMake/Ninja

  • No new language: It's just C. You already know it.
  • Zero dependencies: No need to install Python, CMake, or Ninja. Just a C compiler.
  • Debuggable: It's a standard C program. You can step through your build process in a debugger.

vs nob.h

IncludeBuild and nob.h share the philosophy of "C as a build language", but they target different layers of abstraction.

  • nob.h is a library of tools (string builders, process execution, file operations) that lets you write a build system from scratch. You explicitly construct commands string-by-string.
  • IncludeBuild is a build framework. It gives you project and target objects, per-target compile graphs, depfile-backed incremental rebuilds, and generated compile_commands.json output from the same planned actions used to build.

Documentation

License

CC0 1.0 Universal. See LICENSE.