commit 7a87c09722873327e33779fb29a3e13a27103d89 parent 7adcb7e86fcccbb42e287f5bdf83d66cdeaf7166 Author: Louis Burda <quent.burda@gmail.com> Date: Wed, 3 May 2023 03:58:33 +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 @@ +CC = gcc + +liballoc = lib/liballoc//build/liballoc.a +cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat + -I include -I lib/liballoc/include + +rule mkdir + mkdir $out + +rule liba + $CC -o $out.tmp.o $in $cflags -r + objcopy --keep-global-symbols=libhmap.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 libhmap.lds + +rule cc + $CC -o $out $in $cflags + +target build + mkdir + +target build/libhmap.a + liba src/hmap.c + +target build/libhmap.so + libso src/hmap.c + +target build/test + cc src/test.c build/libhmap.a $liballoc + +target all + file build lib/liballoc//build build/libhmap.a build/libhmap.so build/test +