trying out shared lib
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
strops.o
|
||||
libstrops.so
|
||||
libstrops.a
|
||||
tests
|
||||
|
9
Makefile
9
Makefile
@ -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 -lstrops
|
||||
|
||||
libstrops.so : strops.o
|
||||
gcc -shared -o libstrops.so strops.o
|
||||
|
||||
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 -fPIC -ansi -ggdb -o strops.o strops.c
|
||||
# gcc -c -ansi -O2 -pipe -o strops.o strops.c
|
||||
|
Reference in New Issue
Block a user