From 0446e6addd5de78880f30df70424bc608ba062dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 11 Apr 2004 01:26:22 +0000 Subject: r157: cope with or without LDAP in ldb sample Makefile (This used to be commit 5004159bf93ccb62d056fa67c18f4a52cdbb2026) --- source4/lib/ldb/Makefile.ldb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/Makefile.ldb b/source4/lib/ldb/Makefile.ldb index 2a41629852..f1b2c8ad21 100644 --- a/source4/lib/ldb/Makefile.ldb +++ b/source4/lib/ldb/Makefile.ldb @@ -1,16 +1,24 @@ -OPENLDAP=/home/tridge/samba/openldap/prefix -TDBDIR=../tdb -CFLAGS=-Wall -g -Iinclude -I. -I.. -DSTANDALONE=1 -DUSE_MMAP=1 +# ldap support is optional edit WITH_LDAP to suit +WITH_LDAP=0 + +ifeq ($(WITH_LDAP),1) +OPENLDAP_PREFIX=/home/tridge/samba/openldap/prefix +LDAP_LIBS=-L$(OPENLDAP_PREFIX)/lib -lldap +LDAP_FLAGS=-DHAVE_LDAP=1 +LDB_LDAP_OBJ=ldb_ldap/ldb_ldap.o +endif + +TDBDIR=../tdb -LIB_FLAGS=-Llib -lldb -L$(OPENLDAP)/lib -lldap +CFLAGS=-Wall -g -Iinclude -I. -I.. -DSTANDALONE=1 -DUSE_MMAP=1 $(LDAP_FLAGS) +LIB_FLAGS=-Llib -lldb $(LDAP_LIBS) TDB_OBJ=$(TDBDIR)/tdb.o $(TDBDIR)/spinlock.o LDB_TDB_OBJ=ldb_tdb/ldb_match.o ldb_tdb/ldb_tdb.o \ ldb_tdb/ldb_pack.o ldb_tdb/ldb_search.o ldb_tdb/ldb_index.o -LDB_LDAP_OBJ=ldb_ldap/ldb_ldap.o COMMON_OBJ=common/ldb.o common/ldb_ldif.o common/util.o \ common/ldb_parse.o common/ldb_msg.o -- cgit