summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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;
+}