commit 29d8214bd5107fee78ef75e5830d608ac04777fe parent 52b61eb008aed0300c1f5350e865305aaf4d9907 Author: Louis Burda <quent.burda@gmail.com> Date: Thu, 4 May 2023 18:53:15 +0200 Add 'just' build file Diffstat:
A | build.jst | | | 36 | ++++++++++++++++++++++++++++++++++++ |
1 file changed, 36 insertions(+), 0 deletions(-)
diff --git a/build.jst b/build.jst @@ -0,0 +1,36 @@ +liballoc = lib/liballoc//build/liballoc.a + +cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat + -I include -I lib/liballoc/include + +rule liba + gcc -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 + +rule cc + gcc -o $out $in $cflags + +rule mkdir + mkdir $out + +target build + mkdir + +target build/libdvec.a + # TODO add include dep + liba src/dvec.c $liballoc + +target build/libdvec.so + # TODO add include dep + libso src/dvec.c + +target build/test + cc src/test.c build/libdvec.a $liballoc + +target all + file build build/libdvec.a build/libdvec.so build/test