s4:dsdb_lookup_rids - "unsigned" counters fit better than "signed" in this case
[Samba/ekacnet.git] / lib / tdb / tdb.mk
blobecc6f9fd08a6485fa68ac69589482aa7ca26076c
1 dirs::
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)
10 TDB_STLIB = libtdb.a
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
29 test:: abi_checks
31 test:: bin/tdbtorture$(EXEEXT) $(TDB_SONAME)
32 $(LIB_PATH_VAR)=. bin/tdbtorture$(EXEEXT)
34 abi_checks::
35 @echo ABI checks:
36 @./script/abi_checks.sh tdb include/tdb.h
38 clean::
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) installdocs
56 doc:: manpages/tdbbackup.8 manpages/tdbdump.8 manpages/tdbtool.8
58 .SUFFIXES: .8.xml .8
60 .8.xml.8:
61 -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
63 installdocs::
64 ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man8
65 for I in manpages/*.8; do \
66 ${INSTALLCMD} -m 644 $$I $(DESTDIR)$(mandir)/man8; \
67 done
69 install-python:: build-python
70 mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
71 cp tdb.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
73 check-python:: build-python $(TDB_SONAME)
74 $(LIB_PATH_VAR)=. PYTHONPATH=".:$(tdbdir)" $(PYTHON) $(tdbdir)/python/tests/simple.py
76 clean::
77 rm -f tdb.$(SHLIBEXT)
79 installdirs::
80 mkdir -p $(DESTDIR)$(bindir)
81 mkdir -p $(DESTDIR)$(includedir)
82 mkdir -p $(DESTDIR)$(libdir)
83 mkdir -p $(DESTDIR)$(libdir)/pkgconfig
85 installbin:: all installdirs
86 cp $(PROGS) $(DESTDIR)$(bindir)
88 installheaders:: installdirs
89 cp $(srcdir)/include/tdb.h $(DESTDIR)$(includedir)
91 installlibs:: all installdirs
92 cp tdb.pc $(DESTDIR)$(libdir)/pkgconfig
93 cp $(TDB_STLIB) $(TDB_SOLIB) $(DESTDIR)$(libdir)
94 rm -f $(DESTDIR)$(libdir)/libtdb.$(SHLIBEXT)
95 ln -s $(TDB_SOLIB) $(DESTDIR)$(libdir)/libtdb.$(SHLIBEXT)
96 rm -f $(DESTDIR)$(libdir)/$(TDB_SONAME)
97 ln -s $(TDB_SOLIB) $(DESTDIR)$(libdir)/$(TDB_SONAME)
99 $(TDB_STLIB): $(TDB_OBJ)
100 ar -rv $(TDB_STLIB) $(TDB_OBJ)
102 libtdb.$(SHLIBEXT): $(TDB_SOLIB)
103 ln -fs $< $@
105 $(TDB_SONAME): $(TDB_SOLIB)
106 ln -fs $< $@