diff options
| author | Louis Burda <quent.burda@gmail.com> | 2024-10-02 03:56:19 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2024-10-02 03:58:38 +0200 |
| commit | 897ff51fdb9bccb90415d1bcd54541640dba4465 (patch) | |
| tree | 79e1605d790d54ffe619cfd7791f13507a744217 | |
| parent | 23df461346fac31009f48ab577c3ad0c837b5f7d (diff) | |
| download | libtabular-c-master.tar.gz libtabular-c-master.zip | |
| -rw-r--r-- | .subgitrc | 2 | ||||
| -rw-r--r-- | build.jst | 0 | ||||
| -rw-r--r-- | build.rmk.tmpl | 8 | ||||
| -rwxr-xr-x | configure | 2 | ||||
| -rw-r--r-- | lib/liballoc/.gitignore | 2 | ||||
| -rw-r--r-- | lib/liballoc/build.jst | 51 | ||||
| -rw-r--r-- | lib/liballoc/build.rmk.tmpl (renamed from lib/liballoc/build.jst.tmpl) | 0 | ||||
| -rwxr-xr-x | lib/liballoc/configure | 4 |
8 files changed, 61 insertions, 8 deletions
@@ -5,5 +5,5 @@ declare -A subgit subgitinfo subgit[lib/liballoc]=1 subgitinfo[lib/liballoc/remote]='git@sinitax.com:sinitax/liballoc-c' subgitinfo[lib/liballoc/branch]='master' -subgitinfo[lib/liballoc/commit]='24d37e4298575df36399f32a6fa5ef10b005c964' +subgitinfo[lib/liballoc/commit]='fd51196ac2d1bf1c34c8578146ef1bc66c1c8ec4' diff --git a/build.jst b/build.jst new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/build.jst diff --git a/build.rmk.tmpl b/build.rmk.tmpl index 5aef253..5f874ed 100644 --- a/build.rmk.tmpl +++ b/build.rmk.tmpl @@ -36,7 +36,7 @@ target build mkdir target lib/liballoc/build/liballoc.a - just lib/liballoc + rmk lib/liballoc target build/libtabular.a liba src/tabular.c src/util.c lib/liballoc/build/liballoc.a @@ -53,8 +53,8 @@ command clean rm -rf build command cleanall - just clean - just -C lib/liballoc cleanall + rmk clean + rmk -C lib/liballoc cleanall command install install -m644 include/tabular.h -t "#{DESTDIR}#{PREFIX}#{INCLDIR}" @@ -67,4 +67,4 @@ command uninstall rm -f "#{DESTDIR}#{PREFIX}#{LIBDIR}/libtabular.so" command all - just build/libtabular.a build/libtabular.so build/test + rmk build/libtabular.a build/libtabular.so build/test @@ -1,6 +1,6 @@ #!/bin/sh -tmpl "$@" build.jst.tmpl > build.jst +tmpl "$@" build.rmk.tmpl > build.rmk for lib in ./lib/*; do pushd $lib ./configure "$@" diff --git a/lib/liballoc/.gitignore b/lib/liballoc/.gitignore index ac80ccf..b6a670a 100644 --- a/lib/liballoc/.gitignore +++ b/lib/liballoc/.gitignore @@ -1,6 +1,6 @@ compile_commands.json build -build.jst +build.rmk .cache vgcore* .gdb_history diff --git a/lib/liballoc/build.jst b/lib/liballoc/build.jst new file mode 100644 index 0000000..f590d49 --- /dev/null +++ b/lib/liballoc/build.jst @@ -0,0 +1,51 @@ + + +cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat + -I include -O2 + +rule liba + gcc -o $out.tmp.o $in $cflags -r + objcopy --keep-global-symbols=liballoc.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 liballoc.lds + +rule cc + gcc -o $out $in $cflags + +rule mkdir + mkdir $out + +target build + mkdir + +target build/liballoc.a + liba src/allocator.c | include/allocator.h build + +target build/liballoc.so + libso src/allocator.c | include/allocator.h build + +target build/test + cc src/test.c build/liballoc.a | build + +command clean + rm -rf build + +command cleanall + just clean + +command install + install -m755 build/liballoc.a -t "/usr/local/lib" + install -m755 build/liballoc.so -t "/usr/local/lib" + install -m644 include/allocator.h -t "/usr/local/include" + +command uninstall + rm -f "/usr/local/lib/liballoc.a" + rm -f "/usr/local/lib/liballoc.so" + rm -f "/usr/local/include/allocator.h" + +command all + just build/liballoc.a build/liballoc.so build/test + diff --git a/lib/liballoc/build.jst.tmpl b/lib/liballoc/build.rmk.tmpl index 410749d..410749d 100644 --- a/lib/liballoc/build.jst.tmpl +++ b/lib/liballoc/build.rmk.tmpl diff --git a/lib/liballoc/configure b/lib/liballoc/configure index 9b3f0eb..16d5220 100755 --- a/lib/liballoc/configure +++ b/lib/liballoc/configure @@ -1,3 +1,5 @@ #!/bin/sh -tmpl "$@" build.jst.tmpl > build.jst +set -ex + +tmpl "$@" build.rmk.tmpl > build.rmk |
