commit 4fbb3bd96a616a7e8ef0b34f5f3f72efcfe52de3 parent af0a6916407b3f1549416e6bb4b7a9bec5ea2978 Author: Louis Burda <quent.burda@gmail.com> Date: Mon, 1 May 2023 23:15:27 +0200 Add 'just' build file Diffstat:
A | build.jst | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 40 insertions(+), 0 deletions(-)
diff --git a/build.jst b/build.jst @@ -0,0 +1,40 @@ +CC = gcc + +cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat + -I include -I lib/liballoc/include + +rule liba + $CC -o $out.tmp.o $in $cflags -r + objcopy --keep-global-symbols=libtabular.api $out.tmp.o $out.fixed.o + ar rcs $out $out.fixed.o + rm $out.tmp.o $out.fixed.o + +rule libso + $CC -o $out $in $cflags -shared -Wl,-version-script libtabular.lds + +rule cc + $CC -o $out $in $cflags + +rule mkdir + mkdir $out + +rule rm + rm -rf $in + +target build + mkdir + +target build/libtabular.a + liba src/tabular.c src/util.c lib/liballoc//build/liballoc.a + +target build/libtabular.so + libso src/tabular.c src/util.c + +target build/test + cc src/test.c build/libtabular.a lib/liballoc//build/liballoc.a + +target clean + rm build + +target all + file build build/libtabular.a build/libtabular.so build/test