3 # Makefile for tdb directory
8 exec_prefix = @exec_prefix@
10 includedir = @includedir@
12 VPATH = @srcdir@:@libreplacedir@
15 CFLAGS = -I$(srcdir)/include -Iinclude -I@libreplacedir@ @CFLAGS@
19 PROGS = bin/tdbtool bin/tdbtorture
20 TDB_OBJ = @TDBOBJ@ @LIBREPLACEOBJ@
22 DIRS = lib bin common tools examples
24 all: showflags dirs $(PROGS)
27 @echo 'tdb will be compiled with flags:'
28 @echo ' CFLAGS = $(CFLAGS)'
29 @echo ' LIBS = $(LIBS)'
33 @mkdir -p `dirname $@`
34 @$(CC) $(CFLAGS) -c $< -o $@
41 mkdir -p $(includedir)
43 mkdir -p $(libdir)/pkgconfig
45 cp $(srcdir)/include/tdb.h $(includedir)
46 cp tdb.pc $(libdir)/pkgconfig
49 ar -rv libtdb.a $(TDB_OBJ)
51 bin/tdbtest: tools/tdbtest.o libtdb.a
52 $(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o -L. -ltdb -lgdbm
54 bin/tdbtool: tools/tdbtool.o libtdb.a
55 $(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o -L. -ltdb
57 bin/tdbtorture: tools/tdbtorture.o libtdb.a
58 $(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o -L. -ltdb
60 bin/tdbdump: tools/tdbdump.o libtdb.a
61 $(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o -L. -ltdb
63 bin/tdbbackup: tools/tdbbackup.o libtdb.a
64 $(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o -L. -ltdb
69 installcheck: test install
72 rm -f $(PROGS) common/*.o tools/*.o test.db test.tdb test.gdbm
76 rm -f config.log config.status config.h
79 realdistclean: distclean
80 rm -f configure config.h.in