]> git.sur5r.net Git - openldap/blob - contrib/slapd-modules/nssov/Makefile
Merge remote branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / contrib / slapd-modules / nssov / Makefile
1 # $OpenLDAP$
2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
3 #
4 # Copyright 2008-2012 The OpenLDAP Foundation.
5 # Portions Copyright 2008 Howard Chu, Symas Corp. All Rights Reserved.
6 #
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.
10 #
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>.
14
15 # Path to the OpenLDAP source tree
16 LDAPSRC=../../..
17
18 # Path to the OpenLDAP object tree - same as above unless
19 # you're doing out-of-tree builds.
20 LDAPOBJ=../../..
21
22 LIBTOOL=$(LDAPOBJ)/libtool
23 OPT=-g -O2
24 CC=gcc
25
26 LDAP_INC=-I$(LDAPOBJ)/include -I$(LDAPSRC)/include -I$(LDAPSRC)/servers/slapd
27 NLDAPD_INC=-Inss-pam-ldapd
28 INCS=$(LDAP_INC) $(NLDAPD_INC)
29
30 LDAP_LIB=-lldap_r -llber
31 LIBS=$(LDAP_LIB)
32
33 prefix=/usr/local
34 exec_prefix=$(prefix)
35 ldap_subdir=/openldap
36
37 libdir=$(exec_prefix)/lib
38 libexecdir=$(exec_prefix)/libexec
39 moduledir = $(libexecdir)$(ldap_subdir)
40 sysconfdir = $(prefix)/etc$(ldap_subdir)
41 schemadir = $(sysconfdir)/schema
42
43 all:    nssov.la
44
45 XOBJS = tio.lo
46
47 OBJS = alias.lo ether.lo group.lo host.lo netgroup.lo network.lo \
48         nssov.lo passwd.lo protocol.lo rpc.lo service.lo shadow.lo pam.lo
49
50 .SUFFIXES: .c .o .lo
51
52 .c.lo:
53         $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
54
55 tio.lo: nss-pam-ldapd/tio.c
56         $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
57
58 $(OBJS):        nssov.h
59
60 nssov.la:       $(OBJS) $(XOBJS)
61         $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
62         -rpath $(libdir) -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
63
64 install: nssov.la
65         mkdir -p $(DESTDIR)$(moduledir)
66         $(LIBTOOL) --mode=install cp nssov.la $(DESTDIR)$(moduledir)
67         cp ldapns.schema $(DESTDIR)$(schemadir)
68
69 clean:
70         rm -f *.*o *.la .libs/*
71         rm -rf .libs