commit 83df399924762dd234c2b34f14e296bd3590c147 parent 93bafd206267f9a0f26b03d60f5b52b0571bef56 Author: Louis Burda <quent.burda@gmail.com> Date: Mon, 15 May 2023 16:31:56 +0200 Update build.jst to new syntax Diffstat:
M | build.jst | | | 31 | ++++++++++++++++++++----------- |
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git 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 rule liba - gcc -o $out.tmp.o $in $cflags -r + $cc -o $out.tmp.o $in $cflags -r objcopy --keep-global-symbols=libdvec.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 libdvec.lds rule cc - gcc -o $out $in $cflags + $cc -o $out $in $cflags rule mkdir mkdir $out @@ -21,16 +21,25 @@ rule mkdir target build mkdir +target lib/liballoc/build/liballoc.a + just lib/liballoc + target build/libdvec.a - # TODO add include dep - liba src/dvec.c $liballoc + liba src/dvec.c | include/dvec.h build target build/libdvec.so - # TODO add include dep - libso src/dvec.c + libso src/dvec.c | include/dvec.h build target build/test - cc src/test.c build/libdvec.a $liballoc + cc src/test.c build/libdvec.a lib/liballoc/build/liballoc.a | build + +command clean + rm -rf build + +command cleanall + just clean + just -C lib/liballoc cleanall + +command all + just build/libdvec.a build/libdvec.so build/test -target all - file build build/libdvec.a build/libdvec.so build/test