summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tdb/Makefile.in19
-rw-r--r--source4/lib/tdb/configure.in2
2 files changed, 16 insertions, 5 deletions
diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in
index 1c23aaeea7..849d0bd7c9 100644
--- a/source4/lib/tdb/Makefile.in
+++ b/source4/lib/tdb/Makefile.in
@@ -2,24 +2,33 @@
# Makefile for tdb directory
#
-CFLAGS = -Iinclude @CFLAGS@
CC = @CC@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
+VPATH = @srcdir@
+srcdir = @srcdir@
+builddir = @builddir@
+CFLAGS = -I$(srcdir)/include @CFLAGS@
PROGS = bin/tdbtool bin/tdbtorture
TDB_OBJ = common/tdb.o common/dump.o common/io.o common/lock.o \
common/open.o common/traverse.o common/freelist.o common/error.o \
common/transaction.o
-all: $(PROGS)
+DIRS = lib bin common tools examples
+
+all: dirs $(PROGS)
.c.o:
@echo Compiling $*.c
- @$(CC) $(CFLAGS) -c $< -o $@
+ @mkdir -p `dirname $@`
+ $(CC) $(CFLAGS) -c $< -o $@
+
+dirs:
+ @mkdir -p $(DIRS)
install: all
mkdir -p $(bindir)
@@ -27,8 +36,8 @@ install: all
mkdir -p $(libdir)
mkdir -p $(libdir)/pkgconfig
cp $(PROGS) $(bindir)
- cp include/tdb.h $(includedir)
- cp tdb.pc $(libdir)/pkgconfig
+ cp $(srcdir)/include/tdb.h $(includedir)
+ cp $(srcdir)/tdb.pc $(libdir)/pkgconfig
bin/tdbtest: tools/tdbtest.o $(TDB_OBJ)
$(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm
diff --git a/source4/lib/tdb/configure.in b/source4/lib/tdb/configure.in
index 0a72af20d9..b067940781 100644
--- a/source4/lib/tdb/configure.in
+++ b/source4/lib/tdb/configure.in
@@ -1,7 +1,9 @@
+AC_PREREQ(2.50)
AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
AC_DEFUN([SMB_ENABLE], [echo -n ""])
AC_INIT(include/tdb.h)
+AC_CONFIG_SRCDIR([common/tdb.c])
AC_CONFIG_HEADER(include/config.h)
AC_PROG_CC
AC_SYS_LARGEFILE