summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDavid Moc <personal@cdatgoose.org>2026-03-09 17:40:18 +0100
committerDavid Moc <personal@cdatgoose.org>2026-03-09 17:40:18 +0100
commit1af8b8a568ba1782c7f54c575dd7cbe352e0d4a4 (patch)
tree098fa8507bf30537a1b4cfa0b2389f5f142b17cb /src/main.c
Pushing to repo.HEADmaster
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..237bca3
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,50 @@
+#define _CB_LOG_TO_FILE
+#define CB_DEBUG
+#define _CB_IMPLEMENTATION
+#include "./lib/stb_cbuild.h"
+
+
+
+
+
+
+
+static _CB_PROJECT *rebuild = {0};
+static _CB_PROJECT *pjt = {0};
+
+int main(int argc, char **argv) {
+ _CB_CREATE_PROJECT(pjt,
+ .name = "test",
+ .output = "./bin/test",
+ .files = CB_STRLIST("main.c"),
+ .buildflags = CB_STRLIST("-Wall"),
+ .is_rebuild = 1,
+ .flags = CB_STRLIST("C Build")
+ );
+ _CB_CREATE_PROJECT(rebuild,
+ .name = "cb_rebuild",
+ .output = "./bin/cbuild",
+ .files = CB_STRLIST("./src/main.c"),
+ .is_rebuild = 1,
+ );
+
+
+ _CB_PROJECT_BUILD(
+ .projects = CB_PROJECT_LIST(rebuild),
+ .parallel = 0,
+ .run = 0,
+ );
+
+ _CB_PROJECT_BUILD(
+ .projects = CB_PROJECT_LIST(pjt),
+ .run = 1,
+ .parallel = 0,
+ .run_if_skipped = 1
+ );
+
+
+ cb_free_project(pjt);
+ cb_free_project(rebuild);
+
+ return EXIT_SUCCESS;
+}