Makefile.am revision 850046d576e226dee4996cf41d224ab30f995653
noinst_LIBRARIES = libdict.a libdict_backend.a
dict_drivers = @dict_drivers@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-sql \
-DPKG_RUNDIR=\""$(rundir)"\" \
$(SQL_CFLAGS)
base_sources = \
dict.c \
backend_sources = \
libdict_a_SOURCES = \
$(base_sources)
libdict_backend_a_SOURCES = \
$(backend_sources) \
headers = \
dict.h \
if INSTALL_HEADERS
pkginc_libdir=$(pkgincludedir)/src/lib-dict
pkginc_lib_HEADERS = $(headers)
else
noinst_HEADERS = $(headers)
endif
dict-drivers-register.c: Makefile
rm -f $@
echo '/* this file automatically generated by Makefile */' >$@
echo '#include "lib.h"' >>$@
echo '#include "dict.h"' >>$@
echo '#include "dict-sql.h"' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "extern struct dict dict_driver_$${i};" >>$@ ; \
fi \
done
echo 'void dict_drivers_register_all(void) {' >>$@
echo 'dict_sql_register();' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "dict_driver_register(&dict_driver_$${i});" >>$@ ; \
fi \
done
echo '}' >>$@
echo 'void dict_drivers_unregister_all(void) {' >>$@
echo 'dict_sql_unregister();' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "dict_driver_unregister(&dict_driver_$${i});" >>$@ ; \
fi \
done
echo '}' >>$@
DISTFILES = $(DIST_COMMON) $(base_sources) $(backend_sources) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
distclean-generic:
rm -f Makefile dict-drivers-register.c