[PATCH] MAKE: Add rules to install only shared or static libs.

Dominik Vogt dvogt at ffm.tc.iot.dtag.de
Mon Aug 9 09:38:54 CEST 2010


The rules are
  install-static -- build and install only static libraries and header files
  install-shared -- build and install only shared libraries and header files
  install-common -- build and install only header files
  install        -- build and install everything
---
 src/common.mk |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/common.mk b/src/common.mk
index 4e0f5cd..95287c0 100644
--- a/src/common.mk
+++ b/src/common.mk
@@ -116,14 +116,20 @@ clobber: clean
 	-rm -f $(LIBSNMPPLUS) $(LIBSNMPPLUS_SHARED)
 	-rm -f $(LIBSNMPPLUS_SHARED_MAIN) $(LIBSNMPPLUS_SHARED_NOVERSION)
 
-install: all
+install-common:
 	install -d $(DESTDIR)$(INSTLIBPATH)
 	install -d $(DESTDIR)$(INSTINCPATH)/snmp_pp/
+	install $(HEADERS) $(DESTDIR)$(INSTINCPATH)/snmp_pp/
+
+install-static: lib install-common
 	install $(LIBSNMPPLUS) $(DESTDIR)$(INSTLIBPATH)
+
+install-shared: shlib install-common
 ifneq ($(wildcard $(LIBSNMPPLUS_SHARED)),)
 	install $(LIBSNMPPLUS_SHARED) $(DESTDIR)$(INSTLIBPATH)
 endif
-	install $(HEADERS) $(DESTDIR)$(INSTINCPATH)/snmp_pp/
+
+install: install-static install-shared
 
 #
 #  Dependency rules
-- 
1.5.5.6


--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment;
	filename="0006-DOC-Documentation-for-start_poll_thread-and-stop_.patch"



More information about the AGENTPP mailing list