summaryrefslogtreecommitdiff
path: root/source4/lib/tdb
diff options
context:
space:
mode:
authorPaul Green <paulg@samba.org>2006-12-01 19:48:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:44 -0500
commit4ae568013195b750f52373c9cfc93528c0ea09b5 (patch)
treedb291974f05a1f13a446cad6230630cfb32b4699 /source4/lib/tdb
parentd3d0d069c7699c9928625bfcae8f24f34a6c6781 (diff)
downloadsamba-4ae568013195b750f52373c9cfc93528c0ea09b5.tar.gz
samba-4ae568013195b750f52373c9cfc93528c0ea09b5.tar.bz2
samba-4ae568013195b750f52373c9cfc93528c0ea09b5.zip
r19989: Add support to the tdb Makefile.in for executable extensions and for
separately specifying CPPFLAGS and LDFLAGS. (This used to be commit 41c775efde85cb1115c40488dd3ab49cd77e356d)
Diffstat (limited to 'source4/lib/tdb')
-rw-r--r--source4/lib/tdb/Makefile.in38
1 files changed, 23 insertions, 15 deletions
diff --git a/source4/lib/tdb/Makefile.in b/source4/lib/tdb/Makefile.in
index e158752d43..3ed1178bbb 100644
--- a/source4/lib/tdb/Makefile.in
+++ b/source4/lib/tdb/Makefile.in
@@ -12,11 +12,17 @@ libdir = @libdir@
VPATH = @srcdir@:@libreplacedir@
srcdir = @srcdir@
builddir = @builddir@
-CFLAGS = -I$(srcdir)/include -Iinclude -I@libreplacedir@ @CFLAGS@
+CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude -I@libreplacedir@
+CFLAGS = $(CPPFLAGS) @CFLAGS@
+LDFLAGS = @LDFLAGS@
+EXEEXT = @EXEEXT@
.PHONY: test
-PROGS = bin/tdbtool bin/tdbtorture
+PROGS = bin/tdbtool$(EXEEXT) bin/tdbtorture$(EXEEXT)
+PROGS_NOINSTALL = bin/tdbtest$(EXEEXT) bin/tdbdump$(EXEEXT) bin/tdbbackup$(EXEEXT)
+ALL_PROGS = $(PROGS) $(PROGS_NOINSTALL)
+
TDB_OBJ = @TDBOBJ@ @LIBREPLACEOBJ@
DIRS = bin common tools
@@ -26,6 +32,8 @@ all: showflags dirs $(PROGS)
showflags:
@echo 'tdb will be compiled with flags:'
@echo ' CFLAGS = $(CFLAGS)'
+ @echo ' CPPFLAGS = $(CPPFLAGS)'
+ @echo ' LDFLAGS = $(LDFLAGS)'
@echo ' LIBS = $(LIBS)'
.c.o:
@@ -48,28 +56,28 @@ install: all
libtdb.a: $(TDB_OBJ)
ar -rv libtdb.a $(TDB_OBJ)
-bin/tdbtest: tools/tdbtest.o libtdb.a
- $(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
+bin/tdbtest$(EXEEXT): tools/tdbtest.o libtdb.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
-bin/tdbtool: tools/tdbtool.o libtdb.a
- $(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
+bin/tdbtool$(EXEEXT): tools/tdbtool.o libtdb.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
-bin/tdbtorture: tools/tdbtorture.o libtdb.a
- $(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o libtdb.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
-bin/tdbdump: tools/tdbdump.o libtdb.a
- $(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
+bin/tdbdump$(EXEEXT): tools/tdbdump.o libtdb.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
-bin/tdbbackup: tools/tdbbackup.o libtdb.a
- $(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o libtdb.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
-test: bin/tdbtorture
- bin/tdbtorture
+test: bin/tdbtorture$(EXEEXT)
+ bin/tdbtorture$(EXEEXT)
installcheck: test install
clean:
- rm -f $(PROGS) *.o *.a common/*.o tools/*.o tdb.pc
+ rm -f $(ALL_PROGS) *.o *.a common/*.o tools/*.o tdb.pc
rm -f test.db test.tdb torture.tdb test.gdbm
distclean: clean