2 @mkdir
-p bin common tools
4 PROGS
= bin
/tdbtool
$(EXEEXT
) bin
/tdbdump
$(EXEEXT
) bin
/tdbbackup
$(EXEEXT
)
5 PROGS_NOINSTALL
= bin
/tdbtest
$(EXEEXT
) bin
/tdbtorture
$(EXEEXT
)
6 ALL_PROGS
= $(PROGS
) $(PROGS_NOINSTALL
)
8 TDB_SONAME
= libtdb.
$(SHLIBEXT
).1
9 TDB_SOLIB
= libtdb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
)
12 TDB_LIB
= $(TDB_STLIB
)
14 bin
/tdbtest
$(EXEEXT
): tools
/tdbtest.o
$(TDB_LIB
)
15 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtest tools
/tdbtest.o
-L.
-ltdb
-lgdbm
17 bin
/tdbtool
$(EXEEXT
): tools
/tdbtool.o
$(TDB_LIB
)
18 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtool tools
/tdbtool.o
-L.
-ltdb
20 bin
/tdbtorture
$(EXEEXT
): tools
/tdbtorture.o
$(TDB_LIB
)
21 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbtorture tools
/tdbtorture.o
-L.
-ltdb
23 bin
/tdbdump
$(EXEEXT
): tools
/tdbdump.o
$(TDB_LIB
)
24 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbdump tools
/tdbdump.o
-L.
-ltdb
26 bin
/tdbbackup
$(EXEEXT
): tools
/tdbbackup.o
$(TDB_LIB
)
27 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o bin
/tdbbackup tools
/tdbbackup.o
-L.
-ltdb
31 test:: bin
/tdbtorture
$(EXEEXT
) $(TDB_SONAME
)
32 $(LIB_PATH_VAR
)=. bin
/tdbtorture
$(EXEEXT
)
36 @.
/script
/abi_checks.sh tdb
include/tdb.h
39 rm -f
test.db
test.tdb torture.tdb
test.gdbm
40 rm -f
$(TDB_SONAME
) $(TDB_SOLIB
) $(TDB_STLIB
) libtdb.
$(SHLIBEXT
)
41 rm -f
$(ALL_PROGS
) tdb.
pc
42 rm -f tdb.exports.
sort tdb.exports.
check tdb.exports.
check.
sort
43 rm -f tdb.signatures.
sort tdb.signatures.
check tdb.signatures.
check.
sort
45 build-python
:: tdb.
$(SHLIBEXT
)
47 pytdb.o
: $(tdbdir
)/pytdb.c
48 $(CC
) $(PICFLAG
) -c
$(tdbdir
)/pytdb.c
$(CFLAGS
) `$(PYTHON_CONFIG) --cflags`
50 tdb.
$(SHLIBEXT
): libtdb.
$(SHLIBEXT
) pytdb.o
51 $(SHLD
) $(SHLD_FLAGS
) -o
$@ pytdb.o
-L.
-ltdb
`$(PYTHON_CONFIG) --ldflags`
53 install:: installdirs installbin installheaders installlibs \
54 $(PYTHON_INSTALL_TARGET
)
56 install-python
:: build-python
57 mkdir
-p
$(DESTDIR
)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
58 cp tdb.
$(SHLIBEXT
) $(DESTDIR
)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
60 check-python
:: build-python
$(TDB_SONAME
)
61 $(LIB_PATH_VAR
)=. PYTHONPATH
=".:$(tdbdir)" $(PYTHON
) $(tdbdir
)/python
/tests
/simple.py
67 mkdir
-p
$(DESTDIR
)$(bindir)
68 mkdir
-p
$(DESTDIR
)$(includedir)
69 mkdir
-p
$(DESTDIR
)$(libdir)
70 mkdir
-p
$(DESTDIR
)$(libdir)/pkgconfig
72 installbin
:: all installdirs
73 cp
$(PROGS
) $(DESTDIR
)$(bindir)
75 installheaders
:: installdirs
76 cp
$(srcdir)/include/tdb.h
$(DESTDIR
)$(includedir)
78 installlibs
:: all installdirs
79 cp tdb.
pc $(DESTDIR
)$(libdir)/pkgconfig
80 cp
$(TDB_STLIB
) $(TDB_SOLIB
) $(DESTDIR
)$(libdir)
82 $(TDB_STLIB
): $(TDB_OBJ
)
83 ar -rv
$(TDB_STLIB
) $(TDB_OBJ
)
85 libtdb.
$(SHLIBEXT
): $(TDB_SOLIB
)
88 $(TDB_SONAME
): $(TDB_SOLIB
)