From fd30b35d1073e44c05c7f3999c1cb100739a4f6e Mon Sep 17 00:00:00 2001 From: AustrianToast Date: Thu, 8 May 2025 20:02:59 +0200 Subject: [PATCH] switch to making static library --- Makefile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 09d3a07..96ad052 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ -test: debug - gcc -ansi -L./build -o build/tests src/tests.c -lstrops +tests : libstrops.a + gcc -ansi -I . -L. -o tests tests.c -Wl,-Bstatic -lstrops -Wl,-Bdynamic -debug: - gcc -c -ansi -ggdb -o build/strops.o src/strops.c - gcc -shared -o build/libstrops.so build/strops.o - -#release: -# gcc -ansi -O2 -pipe -fno-semantic-interposition -o build/hdb src/main.c src/db.c -lsqlite3 -# strip build/hdb +libstrops.a : strops.o + ar cr libstrops.a strops.o + rm strops.o +strops.o : strops.c strops.h + gcc -c -ansi -ggdb -o strops.o strops.c +# gcc -c -ansi -O2 -pipe -o strops.o strops.c