# -*- Makefile -*-
if HAVE_LDAP
mdb_LTLIBRARIES += libmdbldap.la
endif

libmdbldap_la_SOURCES :=			\
	src/libs/mdb-xldap/valarray.c		\
	src/libs/mdb-xldap/schema.c		\
	src/libs/mdb-xldap/mdbldap.c		\
	src/libs/mdb-xldap/mdbldapp.h

libmdbldap_la_CPPFLAGS := $(AM_CPPFLAGS)	\
	-DLOCALSTATEDIR=\""$(localstatedir)"\"	\
	-DMDB_INTERNAL

libmdbldap_la_LDFLAGS = -module -avoid-version
libmdbldap_la_LIBADD :=					   \
	$(LDAP_LIBS)					   \
	libbongoutil.la					   \
	libbongoxpl.la					   \
	libbongomemmgr.la				   \
	libbongostreamio.la				   \
	$(top_builddir)/import/log4c/log4c/libbongolog4c.la

if HAVE_LDAP
src/libs/mdb-xldap/all: libmdbldap.la
src/libs/mdb-xldap/install:
	@cd $(top_builddir) && $(MAKE) $(MFLAGS) mdb_LTLIBRARIES=libmdbldap.la install-mdbLTLIBRARIES
else
src/libs/mdb-xldap/all:
src/libs/mdb-xldap/install:
endif
src/libs/mdb-xldap/clean: clean
