xref: /netbsd-src/external/bsd/openldap/dist/contrib/slapd-modules/nssov/Makefile (revision abb0f93cd77b67f080613360c65701f85e5f5cfe)
1# $OpenLDAP: pkg/ldap/contrib/slapd-modules/nssov/Makefile,v 1.1.2.1 2008/07/08 18:53:57 quanah Exp $
2# Copyright 2008 Howard Chu, Symas Corp. All Rights Reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted only as authorized by the OpenLDAP
6# Public License.
7#
8# A copy of this license is available in the file LICENSE in the
9# top-level directory of the distribution or, alternatively, at
10# <http://www.OpenLDAP.org/license.html>.
11
12# Path to the OpenLDAP source tree
13LDAPSRC=../../..
14
15# Path to the OpenLDAP object tree - same as above unless
16# you're doing out-of-tree builds.
17LDAPOBJ=../../..
18
19LIBTOOL=$(LDAPOBJ)/libtool
20OPT=-g -O2
21CC=gcc
22
23LDAP_INC=-I$(LDAPOBJ)/include -I$(LDAPSRC)/include -I$(LDAPSRC)/servers/slapd
24NLDAPD_INC=-Inss-ldapd
25INCS=$(LDAP_INC) $(NLDAPD_INC)
26
27LDAP_LIB=-lldap_r -llber
28LIBS=$(LDAP_LIB)
29
30all:	nssov.la
31
32XOBJS = tio.lo
33
34OBJS = alias.lo ether.lo group.lo host.lo netgroup.lo network.lo \
35	nssov.lo passwd.lo protocol.lo rpc.lo service.lo shadow.lo
36
37.SUFFIXES: .c .o .lo
38
39.c.lo:
40	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
41
42tio.lo:	nss-ldapd/common/tio.c
43	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(NLDAPD_INC) -c $?
44
45$(OBJS):	nssov.h
46
47nssov.la:	$(OBJS) $(XOBJS)
48	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
49	-rpath /usr/local/libexec/openldap -module -o $@ $(OBJS) $(XOBJS) $(LIBS)
50