summaryrefslogtreecommitdiff
path: root/build.c
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-07-10 16:01:57 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-07-10 16:01:57 +0530
commita14da2fe3864712dab4e7c4cfb5c323026d668de (patch)
tree418c8c8ff44a611cbe1c1269b10926527046e232 /build.c
parent2761f8a533e2b025f209222a1e4ec70b91c7e8ee (diff)
moving header files to include directory & moving resources in it's own directory
i know currently there is race condition, but the code is getting too messy, i will continue to this after i make a vis tool to analyse how i should split up files & stuff the code rn needs intense restructing for it to make any more progress
Diffstat (limited to 'build.c')
-rw-r--r--build.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/build.c b/build.c
index 516c0ac..cd2d376 100644
--- a/build.c
+++ b/build.c
@@ -6,7 +6,11 @@
#include <time.h>
#include <string.h>
-#define CC "gcc"//, "-O3"
+#define GLOBAL_INCLUDE "-Iinclude/"
+#define ENGINE_INCLUDE "-Iinclude/engine"
+#define UCI_INCLUDE "-Iinclude/uci"
+
+#define CC "gcc", "-fsanitize=address", "-g", GLOBAL_INCLUDE
#define ENGINE_O "output/engine.o"
#define UCI_O "output/uci.o"
#define MAIN_O "output/main.o"
@@ -109,8 +113,8 @@ int uci_mode(int run_mode) {
}
RUN_CMD({CC, "-c", "src/ipc.c", "-o", IPC_O, NULL});
- RUN_CMD({CC, "-c", "src/engine.c", "-o", ENGINE_O, NULL});
- RUN_CMD({CC, "-c", "src/uci.c", "-o", UCI_O, NULL});
+ RUN_CMD({CC, ENGINE_INCLUDE, "-c", "src/engine.c", "-o", ENGINE_O, NULL});
+ RUN_CMD({CC, UCI_INCLUDE, "-c", "src/uci.c", "-o", UCI_O, NULL});
RUN_CMD({CC, UCI_O, ENGINE_O, IPC_O, "-o", MAIN_O, NULL});
return status != 0;
}