]> git.sur5r.net Git - openldap/blob - contrib/slapd-modules/samba4/Makefile
add slapo-rdnval in support to Samba4
[openldap] / contrib / slapd-modules / samba4 / Makefile
1 # $OpenLDAP$
2 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
3 #
4 # Copyright 1998-2010 The OpenLDAP Foundation.
5 # Copyright 2004 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 LDAP_SRC=../../..
16 # craft according to your installation
17 LDAP_BUILD=../../../../ldap-devel
18
19 LIBTOOL=$(LDAP_BUILD)/libtool
20 OPT=-g -O2
21 CC=gcc
22
23 DEFS=-DSLAPD_OVER_RDNVAL=2
24
25 LDAP_INC=-I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd \
26         -I$(LDAP_BUILD)/include
27 INCS=$(LDAP_INC)
28
29 LDAP_LIB=-lldap_r -llber
30 LIBS=$(LDAP_LIB)
31
32 prefix=/usr/local
33 exec_prefix=$(prefix)
34 ldap_subdir=/openldap
35
36 libdir=$(exec_prefix)/lib
37 libexecdir=$(exec_prefix)/libexec
38 moduledir = $(libexecdir)$(ldap_subdir)
39
40 all:    rdnval.la
41
42 rdnval.lo:      rdnval.c
43         $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
44
45 rdnval.la:      rdnval.lo
46         $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
47         -rpath $(moduledir) -module -o $@ $? $(LIBS)
48
49 clean:
50         rm -f rdnval.o rdnval.lo rdnval.la
51
52 install: rdnval.la
53         mkdir -p $(DESTDIR)$(moduledir)
54         $(LIBTOOL) --mode=install cp rdnval.la $(DESTDIR)$(moduledir)
55