libhmap-c

C hashmap library
git clone https://git.sinitax.com/sinitax/libhmap-c
Log | Files | Refs | LICENSE | sfeed.txt

commit 455ea29f421ec916bf248de8563363c88824cbee
parent eff6ad090ed53cf97b11393fc3ab45abe8f67214
Author: Louis Burda <contact@sinitax.com>
Date:   Thu, 19 Jun 2025 03:38:41 +0200

Update liballoc

Diffstat:
M.subgitrc | 2+-
Mlib/liballoc/.gitignore | 2+-
Dlib/liballoc/build.jst.tmpl | 60------------------------------------------------------------
Alib/liballoc/build.rmk.tmpl | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlib/liballoc/configure | 4+++-
5 files changed, 65 insertions(+), 63 deletions(-)

diff --git a/.subgitrc b/.subgitrc @@ -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]='58d22d92829a0b774604c80f46195d0aa8a8aa99' diff --git 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.tmpl b/lib/liballoc/build.jst.tmpl @@ -1,60 +0,0 @@ -#default PREFIX /usr/local -#default INCLDIR /include -#default LIBDIR /lib -#default CC gcc - -#ifdef DEBUG -#define OPT_CFLAGS -Og -g -#else -#define OPT_CFLAGS -O2 -#endif - -cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat - -I include #{OPT_CFLAGS} #{EXTRA_CFLAGS} - -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 "#{DESTDIR}#{PREFIX}#{LIBDIR}" - install -m755 build/liballoc.so -t "#{DESTDIR}#{PREFIX}#{LIBDIR}" - install -m644 include/allocator.h -t "#{DESTDIR}#{PREFIX}#{INCLDIR}" - -command uninstall - rm -f "#{DESTDIR}#{PREFIX}#{LIBDIR}/liballoc.a" - rm -f "#{DESTDIR}#{PREFIX}#{LIBDIR}/liballoc.so" - rm -f "#{DESTDIR}#{PREFIX}#{INCLDIR}/allocator.h" - -command all - just build/liballoc.a build/liballoc.so build/test - diff --git a/lib/liballoc/build.rmk.tmpl b/lib/liballoc/build.rmk.tmpl @@ -0,0 +1,60 @@ +#default PREFIX /usr/local +#default INCLDIR /include +#default LIBDIR /lib +#default CC gcc + +#ifdef DEBUG +#define OPT_CFLAGS -Og -g +#else +#define OPT_CFLAGS -O2 +#endif + +cflags = -Wunused-function -Wunused-variable -Wconversion -Wformat + -I include #{OPT_CFLAGS} #{EXTRA_CFLAGS} + +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 + rmk clean + +command install + install -m755 build/liballoc.a -t "#{DESTDIR}#{PREFIX}#{LIBDIR}" + install -m755 build/liballoc.so -t "#{DESTDIR}#{PREFIX}#{LIBDIR}" + install -m644 include/allocator.h -t "#{DESTDIR}#{PREFIX}#{INCLDIR}" + +command uninstall + rm -f "#{DESTDIR}#{PREFIX}#{LIBDIR}/liballoc.a" + rm -f "#{DESTDIR}#{PREFIX}#{LIBDIR}/liballoc.so" + rm -f "#{DESTDIR}#{PREFIX}#{INCLDIR}/allocator.h" + +command all + rmk build/liballoc.a build/liballoc.so build/test + diff --git 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