# Makefile.in for back-ndb
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 2008-2021 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
##
## ACKNOWLEDGEMENTS:
## This work was initially developed by Howard Chu for inclusion
## in OpenLDAP Software. This work was sponsored by MySQL.

SRCS = init.cpp tools.cpp config.cpp ndbio.cpp \
	add.cpp bind.cpp compare.cpp delete.cpp modify.cpp modrdn.cpp search.cpp

OBJS = init.lo tools.lo config.lo ndbio.lo \
	add.lo bind.lo compare.lo delete.lo modify.lo modrdn.lo search.lo

LDAP_INCDIR= ../../../include       
LDAP_LIBDIR= ../../../libraries

BUILD_OPT = "--enable-ndb"
BUILD_MOD = @BUILD_NDB@

mod_DEFS = -DSLAPD_IMPORT
MOD_DEFS = $(@BUILD_NDB@_DEFS)
MOD_LIBS = $(SLAPD_NDB_LIBS)

shared_LDAP_LIBS = $(LDAP_LIBLDAP_LA) $(LDAP_LIBLBER_LA)
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)

LIBBASE = back_ndb

XINCPATH = -I.. -I$(srcdir)/.. @SLAPD_NDB_INCS@
XDEFS = $(MODULES_CPPFLAGS)

AC_CXX = g++
CXX = $(AC_CXX)
LTCXX_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
	$(CXX) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c

all-local-lib:	../.backend

.SUFFIXES: .c .o .lo .cpp

.cpp.lo:
	$(LTCXX_MOD) $<

../.backend: lib$(LIBBASE).a
	@touch $@

