added test target to all and added install/uninstall
This commit is contained in:
parent
f743409653
commit
69a7c8eeec
16
c/Makefile
16
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:
|
build:
|
||||||
gcc -c -g cmdlineoptions.c
|
gcc -c -g cmdlineoptions.c
|
||||||
|
@ -15,7 +15,7 @@ dynamic-lib:
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.a *.so example
|
rm -f *.o *.a *.so example-shared example-static tests-shared tests-static
|
||||||
|
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
@ -28,5 +28,13 @@ compile-tests:
|
||||||
gcc tests.c -o tests-static libcmdlineoptions.a
|
gcc tests.c -o tests-static libcmdlineoptions.a
|
||||||
|
|
||||||
test:
|
test:
|
||||||
LD_LIBRARY_PATH="." tests-shared
|
LD_LIBRARY_PATH="." ./tests-shared
|
||||||
tests-static
|
./tests-static
|
||||||
|
|
||||||
|
|
||||||
|
install:
|
||||||
|
cp libcmdlineoptions.so /usr/lib/
|
||||||
|
cp libcmdlineoptions.a /usr/lib/
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm /usr/lib/libcmdlineoptions.*
|
Loading…
Reference in New Issue