summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/Makefile.ldb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/Makefile.ldb')
-rw-r--r--source4/lib/ldb/Makefile.ldb16
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/lib/ldb/Makefile.ldb b/source4/lib/ldb/Makefile.ldb
index 346c041666..b983ca2c49 100644
--- a/source4/lib/ldb/Makefile.ldb
+++ b/source4/lib/ldb/Makefile.ldb
@@ -1,9 +1,11 @@
-CFLAGS=-Wall -g -Iinclude -I. -DSTANDALONE=1 -DUSE_MMAP=1
OPENLDAP=/home/tridge/samba/openldap/prefix
+TDBDIR=../tdb
+
+CFLAGS=-Wall -g -Iinclude -I. -I.. -DSTANDALONE=1 -DUSE_MMAP=1
LIB_FLAGS=-Llib -lldb -L$(OPENLDAP)/lib -lldap
-TDB_OBJ=tdb/tdb.o tdb/spinlock.o
+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
@@ -20,7 +22,15 @@ BINS = bin/ldbadd bin/ldbsearch bin/ldbdel
LIBS = $(LDB_LIB)($(OBJS))
-all: $(BINS) $(LIBS)
+DIRS = lib bin
+
+all: $(DIRS) $(BINS) $(LIBS)
+
+lib:
+ mkdir -p lib
+
+bin:
+ mkdir -p bin
lib/libldb.a: $(OBJS)