From 3c540db464f4034d0a393b076c79a26851f68f47 Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Mon, 6 Jul 2026 23:39:55 +0530 Subject: removed unnescessary stuff + ipc with shared memory + somehow the build is faster? --- build.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'build.c') diff --git a/build.c b/build.c index 663d47c..5d64333 100644 --- a/build.c +++ b/build.c @@ -7,6 +7,10 @@ #include #define CC "gcc", "-O3" +#define ENGINE_O "output/engine.o" +#define UCI_O "output/uci.o" +#define MAIN_O "output/main.o" +#define IPC_O "output/ipc.o" int status; @@ -51,9 +55,6 @@ int needs_rebuild(char* bin_file, char* source_file) { return input_path_time > output_path_time; } -#define ENGINE_O "output/engine.o" -#define UCI_O "output/uci.o" - int main(int argc, char** argv) { if (needs_rebuild(argv[0], __FILE__)) { RUN_CMD({CC, __FILE__, "-o", argv[0], NULL}); @@ -102,12 +103,14 @@ int test_mode(int run_mode) { int uci_mode(int run_mode) { if (run_mode) { - char* args[] = {UCI_O, NULL}; + char* args[] = {MAIN_O, NULL}; print_cmd(args); execvp(args[0], args); } - RUN_CMD({CC, "src/engine.c", "-o", ENGINE_O, NULL}); - RUN_CMD({CC, "src/uci.c", "-o", UCI_O, ENGINE_O, NULL}); + 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, UCI_O, ENGINE_O, IPC_O, "-o", MAIN_O, NULL}); return status != 0; } -- cgit v1.2.3