3 # Makefile for tdb directory
8 exec_prefix = @
exec_prefix@
10 includedir = @
includedir@
12 VPATH
= @
srcdir@
:@libreplacedir@
15 CPPFLAGS
= @CPPFLAGS@
-I
$(srcdir)/include -Iinclude
16 CFLAGS
= $(CPPFLAGS
) @CFLAGS@
19 SHLD_FLAGS
= @SHLD_FLAGS@
20 PACKAGE_VERSION
= @PACKAGE_VERSION@
22 SONAMEFLAG
= @SONAMEFLAG@
27 PROGS
= bin
/tdbtool
$(EXEEXT
) bin
/tdbdump
$(EXEEXT
) bin
/tdbbackup
$(EXEEXT
)
28 PROGS_NOINSTALL
= bin
/tdbtest
$(EXEEXT
) bin
/tdbtorture
$(EXEEXT
)
29 ALL_PROGS
= $(PROGS
) $(PROGS_NOINSTALL
)
31 TDB_OBJ
= @TDB_OBJ@ @LIBREPLACEOBJ@
33 DIRS
= bin common tools
35 SONAME
= libtdb.
$(SHLIBEXT
).1
36 SOLIB
= libtdb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
)
38 all: showflags dirs
$(PROGS
) $(SOLIB
) libtdb.a
41 @echo
'tdb will be compiled with flags:'
42 @echo
' CFLAGS = $(CFLAGS)'
43 @echo
' CPPFLAGS = $(CPPFLAGS)'
44 @echo
' LDFLAGS = $(LDFLAGS)'
45 @echo
' LIBS = $(LIBS)'
51 @mkdir
-p
`dirname $@`
52 @
$(CC
) $(PICFLAG
) $(CFLAGS
) -c
$< -o
$@
58 mkdir
-p
$(DESTDIR
)$(bindir)
59 mkdir
-p
$(DESTDIR
)$(includedir)
60 mkdir
-p
$(DESTDIR
)$(libdir)
61 mkdir
-p
$(DESTDIR
)$(libdir)/pkgconfig
62 cp
$(PROGS
) $(DESTDIR
)$(bindir)
63 cp
$(srcdir)/include/tdb.h
$(DESTDIR
)$(includedir)
64 cp tdb.
pc $(DESTDIR
)$(libdir)/pkgconfig
65 cp libtdb.a
$(SOLIB
) $(DESTDIR
)$(libdir)
68 ar -rv libtdb.a
$(TDB_OBJ
)
70 libtdb.
(SHLIBEXT
): $(SOLIB
)
77 $(CC
) $(SHLD_FLAGS
) -o
$@
$(TDB_OBJ
) $(SONAMEFLAG
)$(SONAME
)
81 bin
/tdbtest
$(EXEEXT
): tools
/tdbtest.o
$(TDB_LIB
)
82 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtest tools
/tdbtest.o
-L.
-ltdb
-lgdbm
84 bin
/tdbtool
$(EXEEXT
): tools
/tdbtool.o
$(TDB_LIB
)
85 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtool tools
/tdbtool.o
-L.
-ltdb
87 bin
/tdbtorture
$(EXEEXT
): tools
/tdbtorture.o
$(TDB_LIB
)
88 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtorture tools
/tdbtorture.o
-L.
-ltdb
90 bin
/tdbdump
$(EXEEXT
): tools
/tdbdump.o
$(TDB_LIB
)
91 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbdump tools
/tdbdump.o
-L.
-ltdb
93 bin
/tdbbackup
$(EXEEXT
): tools
/tdbbackup.o
$(TDB_LIB
)
94 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbbackup tools
/tdbbackup.o
-L.
-ltdb
96 test: bin
/tdbtorture
$(EXEEXT
)
97 bin
/tdbtorture
$(EXEEXT
)
99 installcheck: test install
102 rm -f
$(ALL_PROGS
) *.o
*.a common
/*.o tools
/*.o tdb.
pc
103 rm -f
test.db
test.tdb torture.tdb
test.gdbm
104 rm -f
$(SONAME
) $(SOLIB
) libtdb.a
108 rm -f config.log config.status
include/config.h config.cache
111 realdistclean
: distclean
112 rm -f configure
include/config.h.in