trying out shared lib

This commit is contained in:
2025-05-21 17:49:38 +02:00
parent 28a235b680
commit 1418c2843e
2 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
strops.o strops.o
libstrops.so
libstrops.a libstrops.a
tests tests

View File

@ -1,10 +1,13 @@
tests : libstrops.a tests : libstrops.a libstrops.so
gcc -ansi -I . -L. -o tests tests.c -Wl,-Bstatic -lstrops -Wl,-Bdynamic gcc -ansi -I . -L. -o tests tests.c -Wl,-Bstatic -lstrops -Wl,-Bdynamic
# gcc -ansi -I . -L. -o tests tests.c -lstrops
libstrops.so : strops.o
gcc -shared -o libstrops.so strops.o
libstrops.a : strops.o libstrops.a : strops.o
ar cr libstrops.a strops.o ar cr libstrops.a strops.o
rm strops.o
strops.o : strops.c strops.h strops.o : strops.c strops.h
gcc -c -ansi -ggdb -o strops.o strops.c gcc -c -fPIC -ansi -ggdb -o strops.o strops.c
# gcc -c -ansi -O2 -pipe -o strops.o strops.c # gcc -c -ansi -O2 -pipe -o strops.o strops.c