https://github.com/gimura2022/gnub.h
Small build system like nub.h
https://github.com/gimura2022/gnub.h
build-system c
Last synced: 5 months ago
JSON representation
Small build system like nub.h
- Host: GitHub
- URL: https://github.com/gimura2022/gnub.h
- Owner: gimura2022
- License: mit
- Created: 2024-11-16T19:37:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-04T17:57:10.000Z (over 1 year ago)
- Last Synced: 2025-09-09T20:39:41.510Z (10 months ago)
- Topics: build-system, c
- Language: C
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gnub.h [](https://www.codefactor.io/repository/github/gimura2022/gnub.h)
Small build system like nub.h
## Quick start
1. Clone gnub.h to you project
2. Write build script like this:
```c
#include "../gnub.h"
int main(int argc, char* argv[])
{
struct gnub__cmd_arr self_compile = {0};
gnub__compile_c(&self_compile, "cc", "", "", "", "examples/gnub_recompile_self.c", "gnub.new");
gnub__recompile_self(&self_compile, "gnub.new", argv);
gnub__free_commands(&self_compile);
struct gnub__cmd_arr arr = {0};
gnub__append_command(&arr, "echo", "Hello, world!");
gnub__execute_commands(&arr);
gnub__free_commands(&arr);
return 0;
}
```
3. Compile (`cc gnub.c -o gnub`) and run (`./gnub`)!