added test target to all and added install/uninstall

This commit is contained in:
Marcel 2014-03-09 16:53:39 +00:00
parent f743409653
commit 69a7c8eeec
1 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,6 @@
all: build static-lib dynamic-lib example compile-tests
all: build static-lib dynamic-lib example compile-tests test
build:
gcc -c -g cmdlineoptions.c
@ -15,7 +15,7 @@ dynamic-lib:
clean:
rm -f *.o *.a *.so example
rm -f *.o *.a *.so example-shared example-static tests-shared tests-static
example:
@ -28,5 +28,13 @@ compile-tests:
gcc tests.c -o tests-static libcmdlineoptions.a
test:
LD_LIBRARY_PATH="." tests-shared
tests-static
LD_LIBRARY_PATH="." ./tests-shared
./tests-static
install:
cp libcmdlineoptions.so /usr/lib/
cp libcmdlineoptions.a /usr/lib/
uninstall:
rm /usr/lib/libcmdlineoptions.*