aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4a543c8..01c9712 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,8 @@ HDR =\
LOBJ = $(OBJ:.o=.lo)
+MAN3 = $(OBJ:.o=.3)
+
all: libcontacts.a libcontacts.$(LIBEXT) test
$(OBJ): $($@:.o=.c) $(HDR)
@@ -72,11 +74,13 @@ check: test
install: libcontacts.a libcontacts.$(LIBEXT)
mkdir -p -- "$(DESTDIR)$(PREFIX)/lib"
mkdir -p -- "$(DESTDIR)$(PREFIX)/include"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man3"
cp -- libcontacts.a "$(DESTDIR)$(PREFIX)/lib/"
cp -- libcontacts.h "$(DESTDIR)$(PREFIX)/include/"
cp -- libcontacts.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libcontacts.$(LIBMINOREXT)"
ln -sf -- libcontacts.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libcontacts.$(LIBMAJOREXT)"
ln -sf -- libcontacts.$(LIBMAJOREXT) "$(DESTDIR)$(PREFIX)/lib/libcontacts.$(LIBEXT)"
+ cp -- $(MAN3) "$(DESTDIR)$(MANPREFIX)/man3/"
uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/lib/libcontacts.$(LIBMAJOREXT)"
@@ -84,6 +88,7 @@ uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/lib/libcontacts.$(LIBEXT)"
-rm -f -- "$(DESTDIR)$(PREFIX)/lib/libcontacts.a"
-rm -f -- "$(DESTDIR)$(PREFIX)/include/libcontacts.h"
+ -cd -- "$(DESTDIR)$(MANPREFIX)/man3/" && rm -rf -- $(MAN3)
clean:
-rm -rf -- *.o *.a *.lo *.so *.dylib *.dll *.su test .testdir