[PATCH] MAKE: Add install rules.

Dominik Vogt dvogt at ffm.tc.iot.dtag.de
Mon Aug 2 14:43:10 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 -- install only header files
  install        -- build nd install everything
---
 src/common.mk |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/common.mk b/src/common.mk
index cfd2d1c..c71e838 100644
--- a/src/common.mk
+++ b/src/common.mk
@@ -127,6 +127,10 @@ SHOBJS		= mib_sh.o threads_sh.o tools_sh.o mib_entry_sh.o \
 		  proxy_forwarder_sh.o notification_log_mib_sh.o \
 		  agentpp_config_mib_sh.o
 
+INSTPREFIX	= /usr/local
+INSTLIBPATH	= $(INSTPREFIX)/lib
+INSTINCPATH	= $(INSTPREFIX)/include
+
 
 .SUFFIXES:	.cpp
 
@@ -148,6 +152,21 @@ clean:
 clobber: 	clean
 		$(RM) $(LIBAGENTPLUS) $(SHLIBAGENTPLUS) 
 
+install-common:
+	install -d $(DESTDIR)$(INSTLIBPATH)
+	install -d $(DESTDIR)$(INSTINCPATH)/agent_pp
+	install $(INC)/agent_pp/*.h $(DESTDIR)$(INSTINCPATH)/agent_pp
+
+install-static: lib install-common
+	install $(LIBAGENTPLUS) $(DESTDIR)$(INSTLIBPATH)
+
+install-shared: shlib install-common
+ifneq ($(wildcard $(SHLIBAGENTPLUS)),)
+	install $(SHLIBAGENTPLUS) $(DESTDIR)$(INSTLIBPATH)
+endif
+
+install: install-static install-shared
+
 #depedencies rules
 
 #$(OBJS):	$(HEADERS)
-- 
1.5.5.6


--KsGdsel6WgEHnImy
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment;
	filename="0004-G-Fix-g-compiler-warnings-unused-variables.patch"



More information about the AGENTPP mailing list