2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 # Copyright 2008-2017 The OpenLDAP Foundation.
5 # Portions Copyright 2008 Howard Chu, Symas Corp. All Rights Reserved.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
11 # A copy of this license is available in the file LICENSE in the
12 # top-level directory of the distribution or, alternatively, at
13 # <http://www.OpenLDAP.org/license.html>.
15 # Path to the OpenLDAP source tree
18 # Path to the OpenLDAP object tree - same as above unless
19 # you're doing out-of-tree builds.
20 LDAP_BUILD=$(LDAP_SRC)
22 LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
23 LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
24 $(LDAP_BUILD)/libraries/liblber/liblber.la
26 NLDAPD_INC=-Inss-pam-ldapd
28 LIBTOOL = $(LDAP_BUILD)/libtool
29 INSTALL = /usr/bin/install
33 INCS = $(LDAP_INC) $(NLDAPD_INC)
40 libdir=$(exec_prefix)/lib
41 libexecdir=$(exec_prefix)/libexec
42 moduledir = $(libexecdir)$(ldap_subdir)
43 sysconfdir = $(prefix)/etc$(ldap_subdir)
44 schemadir = $(sysconfdir)/schema
45 mandir = $(exec_prefix)/share/man
46 man5dir = $(mandir)/man5
52 OBJS = alias.lo ether.lo group.lo host.lo netgroup.lo network.lo \
53 nssov.lo passwd.lo protocol.lo rpc.lo service.lo shadow.lo pam.lo
55 MANPAGES = slapo-nssov.5
60 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
62 tio.lo: nss-pam-ldapd/tio.c
63 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
67 nssov.la: $(OBJS) $(XOBJS)
68 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
69 -rpath $(moduledir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
71 install: install-lib install-man FORCE
74 mkdir -p $(DESTDIR)$(moduledir)
75 $(LIBTOOL) --mode=install cp nssov.la $(DESTDIR)$(moduledir)
76 cp ldapns.schema $(DESTDIR)$(schemadir)
78 install-man: $(MANPAGES)
79 mkdir -p $(DESTDIR)$(man5dir)
80 $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir)
85 rm -f *.*o *.la .libs/*