diff --git a/Makefile b/Makefile index a0b5438..53955ac 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -tests : libstrops.a libstrops.so +.POSIX : + +tests : libstrops.a libstrops.so strops.h gcc -ansi -I . -L. -o tests tests.c -Wl,-Bstatic -lstrops -Wl,-Bdynamic # gcc -ansi -I . -L. -o tests tests.c -lstrops @@ -8,6 +10,18 @@ libstrops.so : strops.o libstrops.a : strops.o ar cr libstrops.a strops.o -strops.o : strops.c strops.h - gcc -c -fPIC -ansi -ggdb -o strops.o strops.c -# gcc -c -ansi -O2 -pipe -o strops.o strops.c +strops.o : strops.c +# gcc -c -fPIC -ansi -ggdb -o strops.o strops.c + gcc -c -ansi -O2 -pipe -o strops.o strops.c + +.PHONY : install uninstall + +install: libstrops.a libstrops.so strops.h + sudo mv libstrops.a /usr/local/lib + sudo mv libstrops.so /usr/local/lib + sudo cp strops.h /usr/local/include + +uninstall: + sudo rm /usr/local/lib/libstrops.a + sudo rm /usr/local/lib/libstrops.so + sudo rm /usr/local/include/strops.h