From 8d2006734f80469c8135d76c54ea96d44dd947c1 Mon Sep 17 00:00:00 2001 From: imaginos Date: Fri, 1 Apr 2005 08:31:07 +0000 Subject: [PATCH] make .so's seperatly installable git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@57 726aef4b-f618-498e-8847-2d620e286838 --- modules/Makefile.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/Makefile.in b/modules/Makefile.in index 4a762d01..c0deb05f 100644 --- a/modules/Makefile.in +++ b/modules/Makefile.in @@ -6,17 +6,22 @@ LIBS=@LIBS@ VPATH=.:.. OBJS=$(addsuffix .o, $(basename $(wildcard *.cpp))) SRCS=$(wildcard *.cpp) $(wildcard ../*.cpp) - +INSTALL_TARGS=$(foreach file, $(addsuffix .so, $(basename $(wildcard *.cpp))), install_$(file)) all: $(OBJS) $(addsuffix .so, $(basename $(wildcard *.cpp))) depend:: g++ -M $(CXXFLAGS) $(SRCS) $(INCLUDES) >.depend -install: all - mkdir -p $(prefix)/modules +install: all create_install_dir $(INSTALL_TARGS) install -m 0711 *.so $(prefix)/modules +create_install_dir: + mkdir -p $(prefix)/modules + +install_%: + install -m 0711 $(subst install_,,$@) $(prefix)/modules + clean: rm -rf *.so *.o core core.*