improve makefile, add morphisms for 8bit sized length-prefix array & add test for posint radix conversion

This commit is contained in:
Michael Sippel 2025-01-28 23:53:48 +01:00
parent 06227a2731
commit 475d6d43ba
Signed by: senvas
GPG key ID: F96CF119C34B64A6
8 changed files with 288 additions and 46 deletions
morphisms

View file

@ -1,9 +1,13 @@
TARGETS=lib/posint.so
LIB_DIR=$(shell pwd)/lib
TARGETS=lib/libmorph_length_prefix.so lib/libmorph_posint.so test
all: $(TARGETS)
lib/%.so: src/%.c
gcc -shared -o $@ -fPIC $<
lib/libmorph_%.so: src/%.c
$(CC) -O3 -shared -o $@ -fPIC -Iinclude $<
test: test.c lib/libmorph_length_prefix.so lib/libmorph_posint.so
$(CC) -O3 -L$(LIB_DIR) -o $@ -Iinclude $< -llength_prefix -lposint
clean:
rm $(TARGETS)