CBuild, CB, is a build system for C written in C. It can also be used to execute arbitrary commands so it can build other languages. But that removes the point of making a build system for a language in that same language!
- Download the cb.h header file
- Make a build file (for example called "cb.c")
- Define the "CB_IMPLEMENTATION" macro
- Include "cb.h"
- Make a main function and use the interface to construct a command to build the project
- Compile the build system file using your compiler of choise
Example:
cb.c
#define CB_IMPLEMENTATION
#include "cb.h"
int main() {
command_t *cmd = command_init("gcc");
command_append_n(cmd, "hello.c", "-o hello", NULL);
command_execute(cmd);
return 0;
}Shell
gcc cb.c -o cb
./cb!!THE API IS NOT STABLE YET!!
- Make it cross platform, allowing expandability for different operating systems
- Incremental builds
- Piping commands