8 exec_prefix = @
exec_prefix@
9 datarootdir
= @datarootdir@
10 includedir = @
includedir@
14 VPATH
= @
srcdir@
:@libreplacedir@
17 sharedbuilddir
= @sharedbuilddir@
18 INSTALLCMD
= @INSTALL@
21 TESTS
=test-tdb.sh @TESTS@
22 PACKAGE_VERSION
= @PACKAGE_VERSION@
24 PYTHON_CONFIG
= @PYTHON_CONFIG@
27 LDB_MODULESDIR
= @LDB_MODULESDIR@
29 TALLOC_LIBS
= @TALLOC_LIBS@
30 TALLOC_CFLAGS
= @TALLOC_CFLAGS@
31 TALLOC_OBJ
= @TALLOC_OBJ@
34 TDB_CFLAGS
= @TDB_CFLAGS@
37 TEVENT_LIBS
= @TEVENT_LIBS@
38 TEVENT_CFLAGS
= @TEVENT_CFLAGS@
39 TEVENT_OBJ
= @TEVENT_OBJ@
41 POPT_LIBS
= @POPT_LIBS@
42 POPT_CFLAGS
= @POPT_CFLAGS@
45 LDAP_LIBS
= @LDAP_LIBS@
51 LD_EXPORT_DYNAMIC
= @LD_EXPORT_DYNAMIC@
53 SHLD_FLAGS
= @SHLD_FLAGS@
59 CFLAGS
=-g
-I
$(srcdir)/include -Iinclude
-I
$(srcdir) -I
$(srcdir)/.. \
60 $(POPT_CFLAGS
) $(TALLOC_CFLAGS
) $(TDB_CFLAGS
) $(TEVENT_CFLAGS
) \
61 -DLIBDIR
=\"$(libdir)\" -DSHLIBEXT
=\"$(SHLIBEXT
)\" -DUSE_MMAP
=1 \
62 -DLDB_MODULESDIR
=\"$(LDB_MODULESDIR
)\" \
66 MDLD_FLAGS
= @MDLD_FLAGS@
68 OBJS
= $(MODULES_OBJ
) $(COMMON_OBJ
) $(LDB_TDB_OBJ
) $(TDB_OBJ
) $(TEVENT_OBJ
) $(TALLOC_OBJ
) $(POPT_OBJ
) $(LDB_MAP_OBJ
) @LIBREPLACEOBJ@
$(EXTRA_OBJ
)
70 headers
= $(srcdir)/include/ldb.h
$(srcdir)/include/ldb_errors.h
$(srcdir)/include/ldb_handlers.h
$(srcdir)/include/ldb_module.h
72 BINS
= bin
/ldbadd bin
/ldbsearch bin
/ldbdel bin
/ldbmodify bin
/ldbedit bin
/ldbrename bin
/ldbtest
74 EXAMPLES
= examples
/ldbreader examples
/ldifreader
76 DIRS
= lib bin common ldb_tdb ldb_ldap ldb_sqlite3 modules tools examples
80 include $(ldbdir
)/rules.mk
82 nss
: nssdir
all $(NSS_LIB
)
87 SONAME
= libldb.
$(SHLIBEXT
).0
88 SOLIB
= libldb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
)
89 LIBSOLIB
= lib
/$(SOLIB
)
90 STATICLIB
= lib
/libldb.a
92 lib
/$(SONAME
): $(LIBSOLIB
)
93 ln
-fs libldb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
) $@
95 lib
/libldb.
$(SHLIBEXT
): $(LIBSOLIB
) lib
/$(SONAME
)
96 ln
-fs libldb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
) $@
98 lib
/libnss_ldb.
$(SHLIBEXT
).2: $(NSS_OBJ
) $(LIBSOLIB
)
99 $(SHLD
) $(SHLD_FLAGS
) -o
$@
$(NSS_OBJ
) $(LDFLAGS
) $(LIBSOLIB
) @SONAMEFLAG@libnss_ldb.
$(SHLIBEXT
).2
102 $(SHLD
) $(SHLD_FLAGS
) -o
$@
$(OBJS
) $(LDFLAGS
) $(LIBS
) $(TALLOC_LIBS
) $(TDB_LIBS
) $(TEVENT_LIBS
) $(LIBDL
) $(LDAP_LIBS
) @SONAMEFLAG@
$(SONAME
)
103 ln
-sf libldb.
$(SHLIBEXT
).
$(PACKAGE_VERSION
) lib
/libldb.
$(SHLIBEXT
)
105 all: showflags dirs
$(OBJS
) $(STATICLIB
) $(LIBSOLIB
) $(BINS
) $(EXAMPLES
) manpages \
106 @PYTHON_BUILD_TARGET@
109 ${INSTALLCMD} -d
$(sharedbuilddir
)/lib
110 ${INSTALLCMD} -m
644 $(STATICLIB
) $(sharedbuilddir
)/lib
111 ${INSTALLCMD} -m
755 $(LIBSOLIB
) $(sharedbuilddir
)/lib
112 ln
-sf
$(SOLIB
) $(sharedbuilddir
)/lib
/$(SONAME
)
113 ln
-sf
$(SOLIB
) $(sharedbuilddir
)/lib
/libldb.so
114 ${INSTALLCMD} -d
$(sharedbuilddir
)/include
115 ${INSTALLCMD} -m
644 $(srcdir)/include/ldb.h
$(sharedbuilddir
)/include
116 ${INSTALLCMD} -m
644 $(srcdir)/include/ldb_errors.h
$(sharedbuilddir
)/include
117 ${INSTALLCMD} -m
644 $(srcdir)/include/ldb_handlers.h
$(sharedbuilddir
)/include
123 @
$(srcdir)/docs
/builddocs.sh
"$(XSLTPROC)" "$(srcdir)"
126 test -z
"$(DOXYGEN)" ||
(cd
$(srcdir) && "$(DOXYGEN)")
129 rm -f
*.o
*/*.o
*.gcov
*/*.gc?? tdbtest.ldb
*
130 rm -f
$(BINS
) $(TDB_OBJ
) $(TALLOC_OBJ
) $(STATICLIB
) $(NSS_LIB
) $(LIBSOLIB
)
132 rm -f man
/*.1 man
/*.3 man
/*.html
139 rm -f config.log config.status config.cache
include/config.h
143 realdistclean
:: distclean
144 rm -f configure
include/config.h.in
146 check:: test @PYTHON_CHECK_TARGET@
148 check-soloading
: sample.
$(SHLIBEXT
)
149 LDB_MODULES_PATH
=$(builddir
) $(srcdir)/tests
/test-soloading.sh
151 test:: all check-soloading
152 for t in
$(TESTS
); do echo STARTING
$${t}; $(srcdir)/tests
/$${t} || exit
1; done
155 for t in
$(TESTS
); do echo STARTING
$${t}; VALGRIND
="valgrind -q --db-attach=yes --num-callers=30" $(srcdir)/tests
/$${t} || exit
1; done
157 installcheck:: install test
159 install:: all installdirs installheaders installlibs installbin installdocs \
160 @PYTHON_INSTALL_TARGET@
163 mkdir
-p
$(DESTDIR
)$(includedir) $(DESTDIR
)$(libdir) $(DESTDIR
)$(bindir) $(DESTDIR
)$(libdir)/pkgconfig
165 installheaders
:: installdirs
166 cp
$(headers
) $(DESTDIR
)$(includedir)
168 installlibs
:: installdirs
169 cp
$(STATICLIB
) $(LIBSOLIB
) $(DESTDIR
)$(libdir)
170 cp ldb.
pc $(DESTDIR
)$(libdir)/pkgconfig
172 installbin
:: installdirs
173 cp
$(BINS
) $(DESTDIR
)$(bindir)
175 installdocs
:: installdirs
176 $(srcdir)/docs
/installdocs.sh
$(DESTDIR
)$(mandir)
179 $(GCOV
) -po ldb_sqlite3
$(srcdir)/ldb_sqlite3
/*.c
2| tee ldb_sqlite3.report.gcov
180 $(GCOV
) -po ldb_ldap
$(srcdir)/ldb_ldap
/*.c
2| tee ldb_ldap.report.gcov
181 $(GCOV
) -po ldb_tdb
$(srcdir)/ldb_tdb
/*.c
2| tee ldb_tdb.report.gcov
182 $(GCOV
) -po common
$(srcdir)/common
/*.c
2| tee common.report.gcov
183 $(GCOV
) -po modules
$(srcdir)/modules
/*.c
2| tee modules.report.gcov
184 $(GCOV
) -po tools
$(srcdir)/tools
/*.c
2| tee tools.report.gcov
186 include $(ldbdir
)/ldb.mk