]> git.sur5r.net Git - openldap/commitdiff
Portability fixes. Now has a clean and install target.
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 1 Sep 2009 02:05:19 +0000 (02:05 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 1 Sep 2009 02:05:19 +0000 (02:05 +0000)
contrib/slapd-modules/nssov/Makefile

index a20eb9fdaf45428fbd5d0d650a18435f171904d1..c027891f2928a71320e758de5806e58a89b7bc57 100644 (file)
@@ -30,7 +30,14 @@ INCS=$(LDAP_INC) $(NLDAPD_INC)
 LDAP_LIB=-lldap_r -llber
 LIBS=$(LDAP_LIB)
 
-all:   nssov.la
+prefix=/usr/local
+ldap_subdir=/openldap
+exec_prefix=$(prefix)
+libdir=$(exec_prefix)/lib
+libexecdir=$(prefix)/libexec
+moduledir = $(libexecdir)$(ldap_subdir)
+
+all:   install
 
 XOBJS = tio.lo
 
@@ -49,4 +56,11 @@ $(OBJS):     nssov.h
 
 nssov.la:      $(OBJS) $(XOBJS)
        $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
-       -rpath /usr/local/libexec/openldap -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
+       -rpath $(libdir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
+
+install: nssov.la
+       mkdir -p $(DESTDIR)$(moduledir)
+       $(LIBTOOL) --mode=install cp nssov.la $(DESTDIR)$(moduledir)
+
+clean:
+       rm -f *.*o *.la .libs/*