From 69a7c8eeec91078687fb9cf4b1fc454f56cce70f Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 9 Mar 2014 16:53:39 +0000 Subject: [PATCH] added test target to all and added install/uninstall --- c/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/c/Makefile b/c/Makefile index aedf1d8..469e065 100644 --- a/c/Makefile +++ b/c/Makefile @@ -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 \ No newline at end of file + LD_LIBRARY_PATH="." ./tests-shared + ./tests-static + + +install: + cp libcmdlineoptions.so /usr/lib/ + cp libcmdlineoptions.a /usr/lib/ + +uninstall: + rm /usr/lib/libcmdlineoptions.* \ No newline at end of file