git » nmdb » commit 9876997

Split binaries and man installs.

author Alberto Bertogli
2007-08-08 19:48:28 UTC
committer Alberto Bertogli
2007-08-08 19:48:28 UTC
parent f16e9e039258ee5f635e51407b41e65583e1aad1

Split binaries and man installs.

In case we just want to install only one of them, they should be split.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

libnmdb/Makefile +8 -4
nmdb/Makefile +6 -2

diff --git a/libnmdb/Makefile b/libnmdb/Makefile
index 9206f10..84d2fe2 100644
--- a/libnmdb/Makefile
+++ b/libnmdb/Makefile
@@ -42,18 +42,22 @@ libnmdb.a: $(OBJS)
 	$(AR) cr libnmdb.a $(OBJS)
 
 
-install: libs
+install-lib: libs
 	install -d $(PREFIX)/lib
 	install -m 0755 libnmdb.so $(PREFIX)/lib
 	install -m 0755 libnmdb.a $(PREFIX)/lib
 	install -d $(PREFIX)/include
 	install -m 0644 nmdb.h $(PREFIX)/include
-	install -d $(PREFIX)/man/man3
-	install -m 0644 libnmdb.3 $(PREFIX)/man/man3/
 	@echo
 	@echo "Please run ldconfig to update your library cache"
 	@echo
 
+install-man:
+	install -d $(PREFIX)/man/man3
+	install -m 0644 libnmdb.3 $(PREFIX)/man/man3/
+
+install: install-lib install-man
+
 
 .c.o:
 	$(CC) $(ALL_CFLAGS) -c $< -o $@
@@ -62,6 +66,6 @@ clean:
 	rm -f $(OBJS) libnmdb.so libnmdb.a
 	rm -f *.bb *.bbg *.da *.gcov *.gcda *.gcno gmon.out
 
-.PHONY: default all libs install clean
+.PHONY: default all libs install-lib install-man install clean
 
 
diff --git a/nmdb/Makefile b/nmdb/Makefile
index 6d848a5..a0fd3b0 100644
--- a/nmdb/Makefile
+++ b/nmdb/Makefile
@@ -75,16 +75,20 @@ nmdb: $(OBJS)
 .c.o:
 	$(CC) $(ALL_CFLAGS) -c $< -o $@
 
-install: all
+install-bin: nmdb
 	install -d $(PREFIX)/bin
 	install -m 0755 nmdb $(PREFIX)/bin
+
+install-man:
 	install -d $(PREFIX)/man/man1
 	install -m 0644 nmdb.1 $(PREFIX)/man/man1/
 
+install: install-bin install-man
+
 clean:
 	rm -f $(OBJS) nmdb
 	rm -f *.bb *.bbg *.da *.gcov *.gcda *.gcno gmon.out
 
-.PHONY: default all clean
+.PHONY: default all clean install-bin install-man install