commit f893860388fab3d40f507cbf2a65d8153f7241ba parent 257a494eb3442b50d2ee49b00ba6932b93fb89cc Author: Louis Burda <quent.burda@gmail.com> Date: Mon, 1 May 2023 23:05:28 +0200 Add 'just' build file Diffstat:
A | build.jst | | | 35 | +++++++++++++++++++++++++++++++++++ |
1 file changed, 35 insertions(+), 0 deletions(-)
diff --git a/build.jst b/build.jst @@ -0,0 +1,35 @@ +CC = gcc + +cflags = -Wunused-function -Wunused-variable -Wconversion + -I include + +rule liba + $CC -o $out.tmp.o $in $cflags -r + objcopy --keep-global-symbols=liblist.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 liblist.lds + +rule cc + $CC -o $out $in $cflags + +rule mkdir + mkdir $out + +target build + mkdir + +target build/liblist.a + liba src/list.c + +target build/liblist.so + libso src/list.c + +target build/test + cc src/test.c build/liblist.a + +target all + file build build/liblist.a build/liblist.so build/test +