From 54bf1a9db4b5777725dc52096be48d3879aeec82 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 15 May 2023 16:38:31 +0200 Subject: Update and fix build.jst --- build.jst | 40 +++++++++++++++++++++++++--------------- lib/liballoc | 2 +- lib/libdvec | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/build.jst b/build.jst index d7ab92c..499d529 100644 --- a/build.jst +++ b/build.jst @@ -1,19 +1,19 @@ -liballoc = lib/liballoc//build/liballoc.a +cc = clang cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat - -I include -I lib/liballoc/include + -I include -I lib/liballoc/include -I lib/libdvec/include rule liba - gcc -o $out.tmp.o $in $cflags -r - objcopy --keep-global-symbols=libdvec.api $out.tmp.o $out.fixed.o + $cc -o $out.tmp.o $in $cflags -r + objcopy --keep-global-symbols=libstrvec.api $out.tmp.o $out.fixed.o ar rcs $out $out.fixed.o rm $out.tmp.o $out.fixed.o rule libso - gcc -o $out $in $cflags -shared -Wl,-version-script libdvec.lds + $cc -o $out $in $cflags -shared -Wl,-version-script libstrvec.lds rule cc - gcc -o $out $in $cflags + $cc -o $out $in $cflags rule mkdir mkdir $out @@ -21,16 +21,26 @@ rule mkdir target build mkdir -target build/libdvec.a - # TODO add include dep - liba src/dvec.c $liballoc +target lib/liballoc/build/liballoc.a + just lib/liballoc -target build/libdvec.so - # TODO add include dep - libso src/dvec.c +target build/libstrvec.a + liba src/strvec.c lib/liballoc/build/liballoc.a | build + +target build/libstrvec.so + libso src/strvec.c | build target build/test - cc src/test.c build/libdvec.a $liballoc + cc src/test.c build/libstrvec.a $liballoc | build + +command clean + rm -rf build + +command cleanall + just clean + just -C lib/libdvec cleanall + just -C lib/liballoc cleanall + +command all + just build/libstrvec.a build/libstrvec.so build/test -target all - file build build/libdvec.a build/libdvec.so build/test diff --git a/lib/liballoc b/lib/liballoc index 52903c4..db11471 160000 --- a/lib/liballoc +++ b/lib/liballoc @@ -1 +1 @@ -Subproject commit 52903c46d996b927ff304bae66c522d317a218f3 +Subproject commit db114713e3958e350da181c8894ccf330320f66b diff --git a/lib/libdvec b/lib/libdvec index 93bafd2..83df399 160000 --- a/lib/libdvec +++ b/lib/libdvec @@ -1 +1 @@ -Subproject commit 93bafd206267f9a0f26b03d60f5b52b0571bef56 +Subproject commit 83df399924762dd234c2b34f14e296bd3590c147 -- cgit v1.2.3-71-gd317