1# $OpenLDAP$ 2# This work is part of OpenLDAP Software <http://www.openldap.org/>. 3# 4# Copyright 1998-2011 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 15LIBTOOL=../../../libtool 16OPT=-DSLAPD_OVER_DUPENT=2 -g -O2 17#LIBTOOL=../../../../ldap-devel/libtool 18#OPT=-DSLAPD_OVER_DUPENT=2 -g -O0 19CC=gcc 20 21LDAP_INC=-I../../../include -I../../../servers/slapd 22#LDAP_INC=-I../../../include -I../../../servers/slapd -I../../../../ldap-devel/include 23INCS=$(LDAP_INC) 24 25LDAP_LIB=-lldap_r -llber 26LIBS=$(LDAP_LIB) 27 28prefix=/usr/local 29exec_prefix=$(prefix) 30ldap_subdir=/openldap 31 32libdir=$(exec_prefix)/lib 33libexecdir=$(exec_prefix)/libexec 34moduledir = $(libexecdir)$(ldap_subdir) 35 36all: dupent.la 37 38 39dupent.lo: dupent.c 40 $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $? 41 42dupent.la: dupent.lo 43 $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \ 44 -rpath $(moduledir) -module -o $@ $? $(LIBS) 45 46clean: 47 rm -f dupent.lo dupent.la 48 49install: dupent.la 50 mkdir -p $(DESTDIR)$(moduledir) 51 $(LIBTOOL) --mode=install cp dupent.la $(DESTDIR)$(moduledir) 52 53