From 7f170ee856a07769a2db9a373efecb690a9840ee Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 14 Feb 2024 00:39:57 +0100 Subject: Build librune for Ahoy --- make.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/make.c b/make.c index 14c536f..0a97ff0 100644 --- a/make.c +++ b/make.c @@ -51,6 +51,7 @@ static void cmdput2(cmd_t); static uint64_t flags; static const char *argv0; +static bool librune_built; static void usage(void) @@ -156,6 +157,8 @@ build_ahoy(void) cmd_t c = {0}; struct strv sv = {0}; + build_librune(); + if (glob("src/ahoy/*.c", 0, globerr, &g)) die("glob"); @@ -200,7 +203,7 @@ build_ahoy(void) cmdadd(&c, "-flto"); cmdadd(&c, "-o", c.dst); cmdaddv(&c, objs, g.gl_pathc); - cmdadd(&c, "src/common/cerr.o"); + cmdadd(&c, "src/common/cerr.o", "vendor/librune/librune.a"); CMDPRC2(c); out: @@ -291,6 +294,10 @@ build_librune(void) cmd_t c = {0}; struct strv sv = {0}; + if (librune_built) + return; + librune_built = true; + env_or_default(&sv, "CC", CC); if (FLAGSET('f') -- cgit v1.2.3