# -*- Makefile -*-

ACLOCAL_AMFLAGS = -I build-aux
AM_CPPFLAGS = ${my_CPPFLAGS} -Iinclude -I${top_srcdir}/include ${fmt_CFLAGS} ${gss_CFLAGS} ${iconv_CPPFLAGS} ${jsoncpp_CFLAGS} ${libHX_CFLAGS} ${libcrypto_CFLAGS} ${libcurl_CFLAGS} ${libesedb_CFLAGS} ${libldap_CFLAGS} ${libolecf_CFLAGS} ${libpff_CFLAGS} ${libssl_CFLAGS} ${libxml2_CFLAGS} ${libxxhash_CFLAGS} ${libzstd_CFLAGS} ${mysql_CFLAGS} ${sqlite_CFLAGS} ${tinyxml2_CFLAGS} ${vmime_CFLAGS} ${zlib_CFLAGS}
AM_CFLAGS   = ${my_CFLAGS}
AM_CXXFLAGS = ${my_CXXFLAGS}
AM_LDFLAGS  = ${my_LDFLAGS}
AM_DISTCHECK_CONFIGURE_FLAGS = --with-dcprefix='$${prefix}'
AM_TESTS_ENVIRONMENT = export TEST_PATH=${top_srcdir}/data;

# lib_LTL must be dependency-ordered, or make install fails
lib_LTLIBRARIES = libgromox_common.la libgromox_dbop.la libgromox_mapi.la libgxs_mysql_adaptor.la libgromox_exrpc.la libgromox_ndr.la libgromox_abtree.la libgromox_auth.la libgromox_authz.la libgxm_alias_resolve.la libgxm_exmdb_local.la libgromox_ews.la libgromox_mh_emsmdb.la libgromox_mh_nsp.la libgromox_oab.la libgromox_oxdisco.la libgromox_emsmdb.la libgromox_nsp.la libgromox_rfr.la libgxs_exmdb_provider.la libgxs_event_proxy.la libgxs_event_stub.la libgxs_midb_agent.la libgxs_timer_agent.la libgxs_ruleproc.la

pkglibexec_PROGRAMS = delivery delivery-queue event gromox-snapshot http imap istore lda midb oab oxdisco pop3 timer zcore tools/authtry tools/ddbg tools/textmapquery
if WITH_GNU_LD
version_sc_SYFLAGS = -Wl,--version-script=${srcdir}/default.sym
endif
default_SYFLAGS = ${version_sc_SYFLAGS${NO_VSYM}}
plugin_LDFLAGS = -avoid-version -module
pamlibdir = ${libdir}/security
if HAVE_PAM
pamlib_LTLIBRARIES = pam_gromox.la
endif
if HAVE_PHP
phpinidir = ${dcprefix}${PHP_SYSCONF_DIR}
dist_phpini_DATA = php_mapi/mapi.ini
phplibdir = ${dcprefix}${PHP_EXTENSION_DIR}
phplib_LTLIBRARIES = mapi.la
endif
dist_sysusers_DATA = system/sysusers-gromox.conf
dist_tmpfiles_DATA = system/tmpfiles-gromox.conf
dist_unit_DATA = system/gromox-cleaner.service system/gromox-cleaner.timer \
	system/gromox-delivery.service \
	system/gromox-delivery-queue.service system/gromox-event.service \
	system/gromox-http.service system/gromox-imap.service \
	system/gromox-istore.service \
	system/gromox-midb.service system/gromox-pop3.service \
	system/gromox-snapshot.service system/gromox-snapshot.timer \
	system/gromox-timer.service system/gromox-zcore.service

sbin_PROGRAMS = gromox-abktconv gromox-compress gromox-dbop gromox-e2ghelper gromox-eml2mbox gromox-eml2mt gromox-export gromox-import gromox-mailq gromox-mbck gromox-mbop gromox-mbsize gromox-mkmidb gromox-mkprivate gromox-mkpublic gromox-kdb2mt
if HAVE_CURL
sbin_PROGRAMS += gromox-dscli
endif
if HAVE_ESEDB
sbin_PROGRAMS += gromox-edb2mt
endif
if HAVE_OLECF
sbin_PROGRAMS += gromox-oxm2mt
endif
if HAVE_PFF
sbin_PROGRAMS += gromox-pff2mt
endif
dist_sbin_SCRIPTS = gromox-abktpull tools/gromox-exm2eml tools/gromox-exm2ical tools/gromox-exm2mt tools/gromox-exm2tnef tools/gromox-exm2vcf tools/gromox-ical2mt tools/gromox-mbox2mt tools/gromox-mt2exm tools/gromox-tnef2mt tools/gromox-vcf2mt
dist_pkglibexec_SCRIPTS = tools/kdb-uidextract tools/kdb-uidextract-limited
noinst_DATA = dldcheck.stamp

BUILT_SOURCES = exch/exmdb/rpc.cpp include/exmdb_dispatch.cpp include/mapierr.cpp include/mapitags.cpp include/zrpc_dispatch.cpp include/gromox/paths.h lib/exmdb_rpc.cpp php_mapi/zrpc.cpp
CLEANFILES = ${BUILT_SOURCES} dldcheck.stamp data/abkt.pak data/timezone.pak
libgromox_abtree_la_SOURCES = lib/ab_tree.cpp
libgromox_abtree_la_LDFLAGS = ${default_SYFLAGS}
libgromox_abtree_la_LIBADD = ${fmt_LIBS} libgxs_mysql_adaptor.la
libgromox_auth_la_SOURCES = exch/authmgr.cpp exch/ldap_adaptor.cpp exch/ldap_adaptor.hpp
libgromox_auth_la_LDFLAGS = ${default_SYFLAGS}
libgromox_auth_la_LIBADD = ${libcrypto_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${libldap_LIBS} ${pam_LIBS} libgromox_common.la libgxs_mysql_adaptor.la
EXTRA_libgromox_auth_la_DEPENDENCIES = default.sym
libgromox_authz_la_SOURCES = exch/dnsbl_filter.cpp exch/user_filter.cpp
libgromox_authz_la_LDFLAGS = ${default_SYFLAGS}
libgromox_authz_la_LIBADD = -lpthread ${cares_LIBS} ${libHX_LIBS} ${resolv_LIBS} libgromox_common.la
EXTRA_libgromox_authz_la_DEPENDENCIES = default.sym
libgromox_common_la_SOURCES = lib/bounce_gen.cpp lib/contexts_pool.cpp lib/cryptoutil.cpp lib/dbhelper.cpp lib/double_list.cpp lib/fileio.cpp lib/guid2.cpp lib/list_file.cpp lib/mail_func.cpp lib/mail_func2.cpp lib/oxoabkt.cpp lib/process.cpp lib/simple_tree.cpp lib/stream.cpp lib/string.cpp lib/svc_loader.cpp lib/textmaps.cpp lib/threads_pool.cpp lib/util.cpp lib/wintz.cpp lib/mapi/ext_buffer.cpp lib/mapi/ext_buffer2.cpp
libgromox_common_la_LIBADD = -lpthread ${backtrace_LIBS} ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${libidn_LIBS} ${iconv_LIBS} ${jsoncpp_LIBS} ${sqlite_LIBS} ${libssl_LIBS} ${tinyxml2_LIBS} ${vmime_LIBS} ${libzstd_LIBS}
libgromox_dbop_la_SOURCES = lib/dbop_mysql.cpp lib/dbop_sqlite.cpp
libgromox_dbop_la_LIBADD = ${fmt_LIBS} ${mysql_LIBS} ${sqlite_LIBS} libgromox_common.la
libgromox_exrpc_la_SOURCES = lib/exmdb_client2.cpp lib/exmdb_ext.cpp lib/exmdb_rpc.cpp lib/freebusy.cpp
libgromox_exrpc_la_LIBADD = libgromox_mapi.la libgxs_mysql_adaptor.la
libgromox_mapi_la_SOURCES = lib/email/dsn.cpp lib/email/ical.cpp lib/email/ical2.cpp lib/email/mail.cpp lib/email/mime.cpp lib/email/mjson.cpp lib/email/send.cpp lib/email/vcard.cpp lib/mapi/eid_array.cpp lib/mapi/element_data.cpp lib/mapi/html.cpp lib/mapi/idset.cpp lib/mapi/lzxpress.cpp lib/mapi/oxcical.cpp lib/mapi/oxcmail.cpp lib/mapi/oxcmail2.cpp lib/mapi/oxvcard.cpp lib/mapi/pcl.cpp lib/mapi/proptag_array.cpp lib/mapi/propval.cpp lib/mapi/restriction.cpp lib/mapi/restriction2.cpp lib/mapi/rop_util.cpp lib/mapi/rtf.cpp lib/mapi/rtfcp.cpp lib/mapi/rule_actions.cpp lib/mapi/sortorder_set.cpp lib/mapi/tarray_set.cpp lib/mapi/tnef.cpp lib/mapi/tpropval_array.cpp lib/mapi/usercvt.cpp
libgromox_mapi_la_LIBADD = ${fmt_LIBS} ${libHX_LIBS} ${iconv_LIBS} ${vmime_LIBS} ${libxml2_LIBS} libgromox_common.la
libgromox_ndr_la_SOURCES = exch/ndr.cpp
libgromox_ndr_la_LIBADD = libgromox_common.la

delivery_SOURCES = mda/delivery_app/delivery.hpp mda/delivery_app/main.cpp mda/delivery_app/message_dequeue.cpp mda/delivery_app/transporter.cpp
delivery_LDADD = -lpthread ${libHX_LIBS} ${libssl_LIBS} ${vmime_LIBS} libgromox_auth.la libgromox_common.la libgromox_mapi.la libgxm_alias_resolve.la libgxm_exmdb_local.la libgxs_mysql_adaptor.la libgxs_ruleproc.la
delivery_queue_SOURCES = mda/message_enqueue.cpp mda/smtp/aux.hpp mda/smtp/cmd.cpp mda/smtp/cmd.hpp mda/smtp/flusher.cpp mda/smtp/main.cpp mda/smtp/parser.cpp mda/smtp/parser.hpp mda/smtp/resource.cpp
delivery_queue_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgxs_mysql_adaptor.la
libgxm_alias_resolve_la_SOURCES = mda/alias_resolve.cpp mda/mdabounce.cpp mda/mdabounce.hpp lib/bounce_mda.cpp
libgxm_alias_resolve_la_LDFLAGS = ${default_SYFLAGS}
libgxm_alias_resolve_la_LIBADD = -lpthread ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgxm_alias_resolve_la_DEPENDENCIES = default.sym
libgxm_exmdb_local_la_SOURCES = lib/bounce_mda.cpp mda/exmdb_local/auto_response.cpp mda/exmdb_local/bounce_audit.cpp mda/exmdb_local/bounce_producer.cpp mda/exmdb_local/cache_queue.cpp mda/exmdb_local/exmdb_local.cpp mda/exmdb_local/exmdb_local.hpp
libgxm_exmdb_local_la_LDFLAGS = ${default_SYFLAGS}
libgxm_exmdb_local_la_LIBADD = -lpthread ${fmt_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgxm_exmdb_local_la_DEPENDENCIES = default.sym
EXTRA_DIST = mda/junk.cpp

lda_SOURCES = mda/lda.cpp
lda_LDADD = ${libHX_LIBS} ${vmime_LIBS} libgromox_common.la libgxs_mysql_adaptor.la
pop3_SOURCES = mra/pop3/cmd.cpp mra/pop3/main.cpp mra/pop3/parser.cpp mra/pop3/pop3.hpp mra/pop3/resource.cpp
pop3_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_exrpc.la libgxs_event_proxy.la libgxs_midb_agent.la libgxs_mysql_adaptor.la
imap_SOURCES = mra/imap/cmd.cpp mra/imap/imap.hpp mra/imap/main.cpp mra/imap/parser.cpp mra/imap/resource.cpp
imap_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_event_proxy.la libgxs_event_stub.la libgxs_midb_agent.la libgxs_mysql_adaptor.la
libgxs_event_proxy_la_SOURCES = mra/event_proxy.cpp
libgxs_event_proxy_la_LDFLAGS = ${default_SYFLAGS}
libgxs_event_proxy_la_LIBADD = -lpthread ${fmt_LIBS} ${libHX_LIBS} libgromox_common.la
EXTRA_libgxs_event_proxy_la_DEPENDENCIES = default.sym
libgxs_event_stub_la_SOURCES = mra/event_stub.cpp
libgxs_event_stub_la_LDFLAGS = ${default_SYFLAGS}
libgxs_event_stub_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la
EXTRA_libgxs_event_stub_la_DEPENDENCIES = default.sym
libgxs_midb_agent_la_SOURCES = mra/midb_agent.cpp
libgxs_midb_agent_la_LDFLAGS = ${default_SYFLAGS}
libgxs_midb_agent_la_LIBADD = -lpthread ${fmt_LIBS} ${libHX_LIBS} libgromox_common.la
EXTRA_libgxs_midb_agent_la_DEPENDENCIES = default.sym

http_SOURCES = exch/http/cache.cpp exch/http/cache.hpp exch/http/fastcgi.cpp exch/http/fastcgi.hpp exch/http/hpm_processor.cpp exch/http/hpm_processor.hpp exch/http/http_parser.cpp exch/http/http_parser.hpp exch/http/main.cpp exch/http/ntlmssp.cpp exch/http/ntlmssp.hpp exch/http/pdu_ndr.cpp exch/http/pdu_ndr.hpp exch/http/pdu_ndr_ids.hpp exch/http/pdu_processor.cpp exch/http/pdu_processor.hpp exch/http/resource.hpp exch/http/rewrite2.cpp exch/http/rewrite.hpp exch/http/system_services.cpp exch/http/system_services.hpp
http_LDADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${gss_LIBS} ${iconv_LIBS} ${libHX_LIBS} ${libssl_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgromox_ndr.la libgromox_mapi.la libgromox_ews.la libgromox_mh_emsmdb.la libgromox_mh_nsp.la libgromox_oab.la libgromox_oxdisco.la libgromox_emsmdb.la libgromox_nsp.la libgromox_rfr.la libgxs_exmdb_provider.la libgxs_mysql_adaptor.la libgxs_timer_agent.la
oab_SOURCES = exch/fcgid.cpp
oab_CPPFLAGS = ${AM_CPPFLAGS} -DENTRYPOINT=HPM_oab
oab_LDADD = -lpthread ${libHX_LIBS} libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la libgromox_oab.la
oxdisco_SOURCES = exch/fcgid.cpp
oxdisco_CPPFLAGS = ${AM_CPPFLAGS} -DENTRYPOINT=HPM_oxdisco
oxdisco_LDADD = -lpthread ${libHX_LIBS} libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la libgromox_oxdisco.la
istore_SOURCES = exch/istore.cpp
istore_LDADD = -lpthread ${libHX_LIBS} libgromox_common.la libgromox_mapi.la libgxs_exmdb_provider.la libgxs_mysql_adaptor.la
midb_SOURCES = exch/midb/cmd_parser.cpp exch/midb/cmd_parser.hpp exch/midb/common_util.cpp exch/midb/common_util.hpp exch/midb/mail_engine.cpp exch/midb/mail_engine.hpp exch/midb/main.cpp exch/midb/system_services.hpp
midb_LDADD = -lpthread ${libHX_LIBS} ${fmt_LIBS} ${iconv_LIBS} ${jsoncpp_LIBS} ${libssl_LIBS} ${sqlite_LIBS} ${vmime_LIBS} libgromox_auth.la libgromox_common.la libgromox_dbop.la libgromox_exrpc.la libgromox_mapi.la libgxs_event_proxy.la libgxs_mysql_adaptor.la
zcore_SOURCES = exch/gab.cpp exch/zcore/ab_tree.cpp exch/zcore/ab_tree.hpp exch/zcore/attachment_object.cpp exch/zcore/bounce_producer.hpp exch/zcore/common_util.cpp exch/zcore/common_util.hpp exch/zcore/container_object.cpp exch/zcore/exmdb_client.cpp exch/zcore/exmdb_client.hpp exch/zcore/folder_object.cpp exch/zcore/ics_state.cpp exch/zcore/ics_state.hpp exch/zcore/icsdownctx_object.cpp exch/zcore/icsupctx_object.cpp exch/zcore/main.cpp exch/zcore/message_object.cpp exch/zcore/names.cpp exch/zcore/object_tree.cpp exch/zcore/object_tree.hpp exch/zcore/objects.hpp exch/zcore/rpc_ext.cpp exch/zcore/rpc_ext.hpp exch/zcore/rpc_parser.cpp exch/zcore/rpc_parser.hpp exch/zcore/store_object.cpp exch/zcore/store_object.hpp exch/zcore/system_services.hpp exch/zcore/table_object.cpp exch/zcore/table_object.hpp exch/zcore/user_object.cpp exch/zcore/zserver.cpp exch/zcore/zserver.hpp
zcore_LDADD = -lpthread ${libcrypto_LIBS} ${libHX_LIBS} ${libssl_LIBS} ${vmime_LIBS} libgromox_auth.la libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la libgxs_timer_agent.la libgromox_abtree.la
libgxs_exmdb_provider_la_SOURCES = exch/exmdb/bounce_producer.cpp exch/exmdb/bounce_producer.hpp exch/exmdb/common_util.cpp exch/exmdb/db_engine.cpp exch/exmdb/db_engine.hpp exch/exmdb/parser.cpp exch/exmdb/parser.hpp exch/exmdb/rpc.cpp exch/exmdb/notification_agent.cpp exch/exmdb/notification_agent.hpp exch/exmdb/folder.cpp exch/exmdb/ics.cpp exch/exmdb/instance.cpp exch/exmdb/instbody.cpp exch/exmdb/main.cpp exch/exmdb/message.cpp exch/exmdb/names.cpp exch/exmdb/store.cpp exch/exmdb/store2.cpp exch/exmdb/table.cpp
libgxs_exmdb_provider_la_LDFLAGS = ${default_SYFLAGS}
libgxs_exmdb_provider_la_LIBADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${iconv_LIBS} ${sqlite_LIBS} ${libxxhash_LIBS} libgromox_common.la libgromox_dbop.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgxs_exmdb_provider_la_DEPENDENCIES = default.sym
EXTRA_DIST += exch/bounce_exch.cpp
libgxs_timer_agent_la_SOURCES = exch/timer_agent.cpp
libgxs_timer_agent_la_LDFLAGS = ${default_SYFLAGS}
libgxs_timer_agent_la_LIBADD = -lpthread ${libHX_LIBS} libgromox_common.la
EXTRA_libgxs_timer_agent_la_DEPENDENCIES = default.sym
libgromox_emsmdb_la_SOURCES = exch/emsmdb/asyncemsmdb_interface.cpp exch/emsmdb/asyncemsmdb_interface.hpp exch/emsmdb/attachment_object.cpp exch/emsmdb/attachment_object.hpp exch/emsmdb/aux_ext.cpp exch/emsmdb/aux_types.hpp exch/emsmdb/common_util.cpp exch/emsmdb/common_util.hpp exch/emsmdb/emsmdb_interface.cpp exch/emsmdb/emsmdb_interface.hpp exch/emsmdb/emsmdb_ndr.cpp exch/emsmdb/emsmdb_ndr.hpp exch/emsmdb/exmdb_client.cpp exch/emsmdb/exmdb_client.hpp exch/emsmdb/fastdownctx_object.cpp exch/emsmdb/fastdownctx_object.hpp exch/emsmdb/fastupctx_object.cpp exch/emsmdb/fastupctx_object.hpp exch/emsmdb/folder_object.cpp exch/emsmdb/folder_object.hpp exch/emsmdb/ftstream_parser.cpp exch/emsmdb/ftstream_parser.hpp exch/emsmdb/ftstream_producer.cpp exch/emsmdb/ftstream_producer.hpp exch/emsmdb/ics_state.cpp exch/emsmdb/ics_state.hpp exch/emsmdb/icsdownctx_object.cpp exch/emsmdb/icsdownctx_object.hpp exch/emsmdb/logon_object.cpp exch/emsmdb/logon_object.hpp exch/emsmdb/main.cpp exch/emsmdb/message_object.cpp exch/emsmdb/message_object.hpp exch/emsmdb/names.cpp exch/emsmdb/notify.cpp exch/emsmdb/notify_response.hpp exch/emsmdb/oxcfold.cpp exch/emsmdb/oxcfxics.cpp exch/emsmdb/oxcmsg.cpp exch/emsmdb/oxcprpt.cpp exch/emsmdb/oxcstore.cpp exch/emsmdb/oxctabl.cpp exch/emsmdb/oxomsg.cpp exch/emsmdb/processor_types.hpp exch/emsmdb/rop_dispatch.cpp exch/emsmdb/rop_dispatch.hpp exch/emsmdb/rop_ext.cpp exch/emsmdb/rop_ext.hpp exch/emsmdb/rop_funcs.hpp exch/emsmdb/rop_ids.hpp exch/emsmdb/rop_processor.cpp exch/emsmdb/rop_processor.hpp exch/emsmdb/stream_object.cpp exch/emsmdb/stream_object.hpp exch/emsmdb/table_object.cpp exch/emsmdb/table_object.hpp
libgromox_emsmdb_la_LDFLAGS = ${default_SYFLAGS}
libgromox_emsmdb_la_LIBADD = -lpthread ${libHX_LIBS} ${iconv_LIBS} ${vmime_LIBS} libgromox_common.la libgromox_mapi.la libgromox_ndr.la libgxs_mysql_adaptor.la
EXTRA_libgromox_emsmdb_la_DEPENDENCIES = default.sym
libgromox_nsp_la_SOURCES = exch/nsp/common_util.cpp exch/nsp/common_util.hpp exch/nsp/main.cpp exch/nsp/nsp_interface.cpp exch/nsp/nsp_interface.hpp exch/nsp/nsp_ndr.cpp exch/nsp/nsp_ndr.hpp exch/nsp/nsp_types.hpp
libgromox_nsp_la_LDFLAGS = ${default_SYFLAGS}
libgromox_nsp_la_LIBADD = -lpthread ${libcrypto_LIBS} ${fmt_LIBS} ${libHX_LIBS} ${iconv_LIBS} libgromox_common.la libgromox_mapi.la libgromox_ndr.la libgxs_mysql_adaptor.la libgromox_abtree.la
EXTRA_libgromox_nsp_la_DEPENDENCIES = default.sym
EXTRA_DIST += exch/nsp/repr.cpp
libgromox_rfr_la_SOURCES = exch/rfr.cpp
libgromox_rfr_la_LDFLAGS = ${default_SYFLAGS}
libgromox_rfr_la_LIBADD = ${fmt_LIBS} ${libHX_LIBS} libgromox_common.la libgromox_ndr.la libgxs_mysql_adaptor.la
EXTRA_libgromox_rfr_la_DEPENDENCIES = default.sym
libgromox_ews_la_SOURCES = exch/ews/ObjectCache.hpp exch/ews/context.cpp exch/ews/enums.hpp exch/ews/ews.cpp exch/ews/ews.hpp exch/ews/exceptions.hpp exch/ews/hash.hpp exch/ews/namedtags.hpp exch/ews/requests.cpp exch/ews/requests.hpp exch/ews/serialization.cpp exch/ews/serialization.hpp exch/ews/soaputil.cpp exch/ews/soaputil.hpp exch/ews/structures.cpp exch/ews/structures.hpp
libgromox_ews_la_LDFLAGS = ${default_SYFLAGS}
libgromox_ews_la_LIBADD = ${libHX_LIBS} ${fmt_LIBS} ${tinyxml2_LIBS} ${vmime_LIBS} libgromox_abtree.la libgromox_common.la libgromox_mapi.la libgromox_exrpc.la libgxs_mysql_adaptor.la
EXTRA_libgromox_ews_la_DEPENDENCIES = default.sym
libgromox_mh_emsmdb_la_SOURCES = exch/mh/emsmdb.cpp exch/mh/mh_common.cpp exch/mh/mh_common.hpp
libgromox_mh_emsmdb_la_LDFLAGS = ${default_SYFLAGS}
libgromox_mh_emsmdb_la_LIBADD = -lpthread ${fmt_LIBS} libgromox_common.la libgromox_mapi.la
EXTRA_libgromox_mh_emsmdb_la_DEPENDENCIES = default.sym
libgromox_mh_nsp_la_SOURCES = exch/mh/mh_common.cpp exch/mh/mh_common.hpp exch/mh/nsp.cpp exch/mh/nsp_bridge.cpp exch/mh/nsp_bridge.hpp exch/mh/nsp_common.cpp exch/mh/nsp_common.hpp exch/mh/nsp_ops.cpp exch/mh/nsp_ops.hpp
libgromox_mh_nsp_la_LDFLAGS = ${default_SYFLAGS}
libgromox_mh_nsp_la_LIBADD = -lpthread ${fmt_LIBS} libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgromox_mh_nsp_la_DEPENDENCIES = default.sym
libgromox_oxdisco_la_SOURCES = exch/oxdisco.cpp
libgromox_oxdisco_la_LDFLAGS = ${default_SYFLAGS}
libgromox_oxdisco_la_LIBADD = ${libHX_LIBS} ${fmt_LIBS} ${tinyxml2_LIBS} libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgromox_oxdisco_la_DEPENDENCIES = default.sym
libgromox_oab_la_SOURCES = exch/oab.cpp
libgromox_oab_la_LDFLAGS = ${default_SYFLAGS}
libgromox_oab_la_LIBADD = ${fmt_LIBS} ${libcrypto_LIBS} ${libxxhash_LIBS} ${tinyxml2_LIBS} libgromox_abtree.la libgromox_common.la libgromox_mapi.la libgxs_mysql_adaptor.la
EXTRA_libgromox_oab_la_DEPENDENCIES = default.sym
libgxs_mysql_adaptor_la_SOURCES = exch/mysql_adaptor/mysql_adaptor.cpp exch/mysql_adaptor/sql2.cpp exch/mysql_adaptor/sql2.hpp
libgxs_mysql_adaptor_la_LDFLAGS = ${default_SYFLAGS}
libgxs_mysql_adaptor_la_LIBADD = -lpthread ${crypt_LIBS} ${libHX_LIBS} ${fmt_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la
EXTRA_libgxs_mysql_adaptor_la_DEPENDENCIES = default.sym
libgxs_ruleproc_la_SOURCES = lib/ruleproc.cpp
libgxs_ruleproc_la_LDFLAGS = ${default_SYFLAGS}
libgxs_ruleproc_la_LIBADD = ${vmime_LIBS} libgromox_common.la libgromox_exrpc.la libgxs_mysql_adaptor.la
EXTRA_libgxs_ruleproc_la_DEPENDENCIES = ${default_SYM}

pam_gromox_la_SOURCES = tools/pam_gromox.cpp
pam_gromox_la_LIBADD = ${libHX_LIBS} ${pam_LIBS} libgromox_auth.la libgromox_common.la libgxs_mysql_adaptor.la
pam_gromox_la_LDFLAGS = ${plugin_LDFLAGS} ${default_SYFLAGS}
event_SOURCES = tools/event.cpp
event_LDADD = -lpthread ${libHX_LIBS} ${libssl_LIBS} libgromox_common.la
gromox_abktconv_SOURCES = tools/abktconv.cpp
gromox_abktconv_LDADD = ${libHX_LIBS} libgromox_common.la
gromox_compress_SOURCES = tools/compress.cpp
gromox_compress_LDADD = ${libHX_LIBS} libgromox_common.la
gromox_dbop_SOURCES = tools/dbop_main.cpp
gromox_dbop_LDADD = ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_dbop.la
gromox_dscli_SOURCES = tools/dscli.cpp
gromox_dscli_LDADD = ${cares_LIBS} ${libcurl_LIBS} ${libHX_LIBS} ${resolv_LIBS} ${tinyxml2_LIBS}
gromox_e2ghelper_SOURCES = tools/e2ghelper.cpp
gromox_e2ghelper_LDADD = ${libHX_LIBS}
gromox_edb2mt_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/edb2mt.cpp tools/edb_pack.cpp
gromox_edb2mt_LDADD = ${libHX_LIBS} ${libesedb_LIBS} ${iconv_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
gromox_eml2mbox_SOURCES = tools/eml2mbox.cpp
gromox_eml2mbox_LDADD = ${libHX_LIBS}
gromox_eml2mt_SOURCES = tools/eml2mt.cpp tools/genimport.cpp tools/genimport.hpp
gromox_eml2mt_LDADD = ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la
gromox_export_SOURCES = tools/exporter.cpp tools/genimport.cpp tools/genimport.hpp
gromox_export_LDADD = ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la
gromox_mailq_SOURCES = tools/mailq.cpp
gromox_mailq_LDADD = libgromox_common.la
gromox_mbck_SOURCES = tools/mbck.cpp
gromox_mbck_LDADD = ${libHX_LIBS} ${fmt_LIBS} ${sqlite_LIBS} libgromox_common.la
gromox_mbop_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/mbop.hpp tools/mbop.cpp
EXTRA_DIST += tools/kdbsub.cpp tools/mbop_cvt.cpp tools/mbop_delmsg.cpp tools/mbop_emptyfld.cpp tools/mbop_foreach.cpp tools/mbop_freebusy.cpp tools/mbop_locale.cpp tools/mbop_main.cpp tools/mbop_purge.cpp tools/mbop_walk.cpp tools/staticnpmap.cpp
gromox_mbop_LDADD = ${libHX_LIBS} ${jsoncpp_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la libgxs_midb_agent.la
gromox_mbsize_SOURCES = tools/mbsize.cpp
gromox_mbsize_LDADD = ${sqlite_LIBS} libgromox_common.la
gromox_mkmidb_SOURCES = tools/mkmidb.cpp tools/mkshared.cpp tools/mkshared.hpp
gromox_mkmidb_LDADD = ${fmt_LIBS} ${libHX_LIBS} ${mysql_LIBS} ${libssl_LIBS} ${sqlite_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la
gromox_mkprivate_SOURCES = tools/mkprivate.cpp tools/mkshared.cpp tools/mkshared.hpp
gromox_mkprivate_LDADD = ${fmt_LIBS} ${libHX_LIBS} ${mysql_LIBS} ${libssl_LIBS} ${sqlite_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la
gromox_mkpublic_SOURCES = tools/mkpublic.cpp tools/mkshared.cpp tools/mkshared.hpp
gromox_mkpublic_LDADD = ${fmt_LIBS} ${libHX_LIBS} ${mysql_LIBS} ${libssl_LIBS} ${sqlite_LIBS} libgromox_common.la libgromox_dbop.la libgromox_mapi.la
gromox_kdb2mt_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/kdb2mt.cpp
gromox_kdb2mt_LDADD = ${fmt_LIBS} ${libHX_LIBS} ${jsoncpp_LIBS} ${mysql_LIBS} ${libpff_LIBS} ${zlib_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
gromox_import_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/importer.cpp
gromox_import_LDADD = ${fmt_LIBS} ${jsoncpp_LIBS} ${libHX_LIBS} ${mysql_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la libgxs_mysql_adaptor.la libgxs_ruleproc.la
gromox_oxm2mt_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/oxm2mt.cpp
gromox_oxm2mt_LDADD = ${libHX_LIBS} ${fmt_LIBS} ${iconv_LIBS} ${mysql_LIBS} ${libolecf_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
gromox_pff2mt_SOURCES = tools/genimport.cpp tools/genimport.hpp tools/pff2mt.cpp
gromox_pff2mt_LDADD = ${libHX_LIBS} ${iconv_LIBS} ${mysql_LIBS} ${libpff_LIBS} libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
gromox_snapshot_SOURCES = tools/snapshot.cpp
gromox_snapshot_LDADD = ${libHX_LIBS} libgromox_common.la
timer_SOURCES = tools/timer.cpp
timer_LDADD = -lpthread ${libHX_LIBS} ${libssl_LIBS} libgromox_common.la

mapi_la_CPPFLAGS = ${AM_CPPFLAGS} ${PHP_INCLUDES}
mapi_la_SOURCES = php_mapi/ext.hpp php_mapi/ext_pack.cpp php_mapi/mapi.cpp php_mapi/mapi_arginfo.hpp php_mapi/rpc_ext.cpp php_mapi/type_conversion.cpp php_mapi/type_conversion.hpp php_mapi/zclient.cpp php_mapi/zrpc.cpp
mapi_la_LIBADD = ${fmt_LIBS} ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
mapi_la_LDFLAGS = ${plugin_LDFLAGS} ${default_SYFLAGS} ${PHP_LDFLAGS}
if WITH_GNU_LD
mapi_la_LDFLAGS += -Wl,--allow-shlib-undefined
endif
EXTRA_mapi_la_DEPENDENCIES = default.sym

noinst_PROGRAMS = dldcheck tests/bodyconv tests/compress tests/dnsbl_check tests/exrpctest tests/gxl-383 tests/jsontest tests/oxcmail_ie tests/ucvttest tests/udb tests/utf8filter tests/utiltest tests/vcard tools/tzdump
if HAVE_ESEDB
noinst_PROGRAMS += tests/epv_unpack
endif
if HAVE_GSSAPI
noinst_PROGRAMS += tests/gssauth
endif
dldcheck_SOURCES = tools/dldcheck.cpp
dldcheck_LDADD = ${dl_LIBS}
TESTS = tests/bodyconv tests/utiltest
tests_udb_SOURCES = tests/userdb.cpp
tests_udb_LDADD = ${libHX_LIBS} libgromox_common.la libgxs_mysql_adaptor.la
tests_bodyconv_SOURCES = tests/bodyconv.cpp
tests_bodyconv_LDADD = ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tests_compress_SOURCES = tests/compress.cpp
tests_compress_LDADD = libgromox_common.la
tests_dnsbl_check_SOURCES = tests/dnsbl_check.cpp
tests_dnsbl_check_LDADD = libgromox_authz.la libgromox_common.la
tests_epv_unpack_SOURCES = tests/epv_unpack.cpp tools/edb_pack.cpp tools/edb_pack.hpp
tests_epv_unpack_LDADD = ${libesedb_LIBS} ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tests_exrpctest_SOURCES = tests/exrpctest.cpp
tests_exrpctest_LDADD = libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
tests_gssauth_SOURCES = tests/gssauth.cpp
tests_gssauth_LDADD = ${libHX_LIBS} ${gss_LIBS} libgromox_common.la
tests_gxl_383_SOURCES = tests/gxl-383.cpp
tests_gxl_383_LDADD = libgromox_common.la libgromox_exrpc.la libgromox_mapi.la
tests_jsontest_SOURCES = tests/jsontest.cpp
tests_jsontest_LDADD = ${jsoncpp_LIBS} libgromox_common.la libgromox_mapi.la
tests_oxcmail_ie_SOURCES = tests/oxcmail_ie.cpp
tests_oxcmail_ie_LDADD = ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tests_ucvttest_SOURCES = tests/ucvttest.cpp
tests_ucvttest_LDADD = libgromox_mapi.la
tests_utf8filter_SOURCES = tests/utf8filter.cpp
tests_utf8filter_LDADD = ${libHX_LIBS} libgromox_common.la
tests_utiltest_SOURCES = tests/utiltest.cpp
tests_utiltest_LDADD = ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tests_vcard_SOURCES = tests/vcard.cpp
tests_vcard_LDADD = ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tools_authtry_SOURCES = tools/authtry.cpp
tools_authtry_LDADD = ${libHX_LIBS} ${libldap_LIBS} libgromox_auth.la libgromox_authz.la libgromox_common.la libgxs_mysql_adaptor.la
tools_ddbg_SOURCES = tools/ddbg.cpp
tools_ddbg_LDADD = ${libHX_LIBS} libgromox_common.la libgromox_mapi.la
tools_textmapquery_SOURCES = tools/textmapquery.cpp
tools_textmapquery_LDADD = libgromox_common.la
tools_tzdump_SOURCES = tools/tzdump.cpp
tools_tzdump_LDADD = ${libHX_LIBS} libgromox_common.la

dist_man_MANS = \
	doc/alias_resolve.4gx doc/authmgr.4gx doc/authtry.8gx \
	doc/autoconfig.7 doc/autodiscover.4gx doc/autodiscover.7 \
	doc/ddbg.1gx doc/delivery.8gx \
	doc/delivery-queue.8gx doc/dnsbl_filter.4gx doc/event.8gx \
	doc/event_proxy.4gx doc/event_stub.4gx doc/ews.4gx \
	doc/exchange_emsmdb.4gx doc/exchange_nsp.4gx \
	doc/exchange_rfr.4gx doc/exmdb_local.4gx doc/exmdb_provider.4gx \
	doc/gromox.7 doc/gromox-abktconv.8 doc/gromox-abktpull.8 \
	doc/gromox.cfg.5 doc/gromox-cleaner.service.8 \
	doc/gromox-compress.8 doc/gromox-dbop.8 doc/gromox-dscli.8 \
	doc/gromox-e2ghelper.8 doc/gromox-edb2mt.8 doc/gromox-eml2mbox.8 \
	doc/gromox-eml2mt.8 doc/gromox-exm2eml.8 doc/gromox-exm2ical.8 \
	doc/gromox-exm2mt.8 doc/gromox-exm2tnef.8 doc/gromox-exm2vcf.8 \
	doc/gromox-export.8 doc/gromox-ical2mt.8 doc/gromox-import.8 \
	doc/gromox-kdb2mt.8 doc/gromox-mailq.8 doc/gromox-mbck.8 \
	doc/gromox-mbop.8 doc/gromox-mbox2mt.8 doc/gromox-mbsize.8 \
	doc/gromox-mkmidb.8 doc/gromox-mkprivate.8 doc/gromox-mkpublic.8 \
	doc/gromox-mt2exm.8 doc/gromox-oxm2mt.8 doc/gromox-pff2mt.8 \
	doc/gromox-selinux.5 doc/gromox-snapshot.8 doc/gromox-tnef2mt.8 \
	doc/gromox-vcf2mt.8 doc/http.8gx doc/imap.8gx doc/istore.8gx \
	doc/kdb-uidextract.8 doc/kdb-uidextract-limited.8 \
	doc/ldap_adaptor.4gx doc/mapi.4gx doc/mapi.7gx doc/mh_emsmdb.4gx \
	doc/mh_nsp.4gx doc/midb.8gx doc/midb_agent.4gx doc/mod_cache.4gx \
	doc/mod_fastcgi.4gx doc/mod_rewrite.4gx doc/mysql_adaptor.4gx \
	doc/oab.4gx \
	doc/pam_gromox.4gx doc/php-mapi.4 doc/pop3.8gx doc/timer.8gx \
	doc/timer_agent.4gx doc/user_filter.4gx doc/zcore.8gx
if HAVE_ESEDB
dist_man_MANS += doc/gromox-edb2mt.8
endif
if HAVE_OLECF
dist_man_MANS += doc/gromox-oxm2mt.8
endif
if HAVE_PFF
dist_man_MANS += doc/gromox-pff2mt.8
endif
 
abkt_files = data/401-0.abkt data/401-1.abkt data/401-2.abkt data/401-200.abkt data/401-3.abkt data/401-6.abkt data/402-0.abkt data/402-1.abkt data/402-2.abkt data/402-200.abkt data/402-3.abkt data/402-6.abkt data/403-0.abkt data/403-1.abkt data/403-2.abkt data/403-200.abkt data/403-3.abkt data/403-6.abkt data/404-0.abkt data/404-1.abkt data/404-2.abkt data/404-200.abkt data/404-3.abkt data/404-6.abkt data/405-0.abkt data/405-1.abkt data/405-2.abkt data/405-200.abkt data/405-3.abkt data/405-6.abkt data/406-0.abkt data/406-1.abkt data/406-2.abkt data/406-200.abkt data/406-3.abkt data/406-6.abkt data/407-0.abkt data/407-1.abkt data/407-2.abkt data/407-200.abkt data/407-3.abkt data/407-6.abkt data/408-0.abkt data/408-1.abkt data/408-2.abkt data/408-200.abkt data/408-3.abkt data/408-6.abkt data/409-0.abkt data/409-1.abkt data/409-2.abkt data/409-200.abkt data/409-3.abkt data/409-6.abkt data/40b-0.abkt data/40b-1.abkt data/40b-2.abkt data/40b-200.abkt data/40b-3.abkt data/40b-6.abkt
abkt_files += data/40c-0.abkt data/40c-1.abkt data/40c-2.abkt data/40c-200.abkt data/40c-3.abkt data/40c-6.abkt data/40d-0.abkt data/40d-1.abkt data/40d-2.abkt data/40d-200.abkt data/40d-3.abkt data/40d-6.abkt data/40e-0.abkt data/40e-1.abkt data/40e-2.abkt data/40e-200.abkt data/40e-3.abkt data/40e-6.abkt data/40f-0.abkt data/40f-1.abkt data/40f-2.abkt data/40f-200.abkt data/40f-3.abkt data/40f-6.abkt data/410-0.abkt data/410-1.abkt data/410-2.abkt data/410-200.abkt data/410-3.abkt data/410-6.abkt data/411-0.abkt data/411-1.abkt data/411-2.abkt data/411-200.abkt data/411-3.abkt data/411-6.abkt data/412-0.abkt data/412-1.abkt data/412-2.abkt data/412-200.abkt data/412-3.abkt data/412-6.abkt data/413-0.abkt data/413-1.abkt data/413-2.abkt data/413-200.abkt data/413-3.abkt data/413-6.abkt data/414-0.abkt data/414-1.abkt data/414-2.abkt data/414-200.abkt data/414-3.abkt data/414-6.abkt data/415-0.abkt data/415-1.abkt data/415-2.abkt data/415-200.abkt data/415-3.abkt data/415-6.abkt
abkt_files += data/416-0.abkt data/416-1.abkt data/416-2.abkt data/416-200.abkt data/416-3.abkt data/416-6.abkt data/418-0.abkt data/418-1.abkt data/418-2.abkt data/418-200.abkt data/418-3.abkt data/418-6.abkt data/419-0.abkt data/419-1.abkt data/419-2.abkt data/419-200.abkt data/419-3.abkt data/419-6.abkt data/41a-0.abkt data/41a-1.abkt data/41a-2.abkt data/41a-200.abkt data/41a-3.abkt data/41a-6.abkt data/41b-0.abkt data/41b-1.abkt data/41b-2.abkt data/41b-200.abkt data/41b-3.abkt data/41b-6.abkt data/41d-0.abkt data/41d-1.abkt data/41d-2.abkt data/41d-200.abkt data/41d-3.abkt data/41d-6.abkt data/41e-0.abkt data/41e-1.abkt data/41e-2.abkt data/41e-200.abkt data/41e-3.abkt data/41e-6.abkt data/41f-0.abkt data/41f-1.abkt data/41f-2.abkt data/41f-200.abkt data/41f-3.abkt data/41f-6.abkt data/420-0.abkt data/420-1.abkt data/420-2.abkt data/420-200.abkt data/420-3.abkt data/420-6.abkt data/421-0.abkt data/421-1.abkt data/421-2.abkt data/421-200.abkt data/421-3.abkt data/421-6.abkt
abkt_files += data/422-0.abkt data/422-1.abkt data/422-2.abkt data/422-200.abkt data/422-3.abkt data/422-6.abkt data/424-0.abkt data/424-1.abkt data/424-2.abkt data/424-200.abkt data/424-3.abkt data/424-6.abkt data/425-0.abkt data/425-1.abkt data/425-2.abkt data/425-200.abkt data/425-3.abkt data/425-6.abkt data/426-0.abkt data/426-1.abkt data/426-2.abkt data/426-200.abkt data/426-3.abkt data/426-6.abkt data/427-0.abkt data/427-1.abkt data/427-2.abkt data/427-200.abkt data/427-3.abkt data/427-6.abkt data/429-0.abkt data/429-1.abkt data/429-2.abkt data/429-200.abkt data/429-3.abkt data/429-6.abkt data/42a-0.abkt data/42a-1.abkt data/42a-2.abkt data/42a-200.abkt data/42a-3.abkt data/42a-6.abkt data/42d-0.abkt data/42d-1.abkt data/42d-2.abkt data/42d-200.abkt data/42d-3.abkt data/42d-6.abkt data/439-0.abkt data/439-1.abkt data/439-2.abkt data/439-200.abkt data/439-3.abkt data/439-6.abkt data/43e-0.abkt data/43e-1.abkt data/43e-2.abkt data/43e-200.abkt data/43e-3.abkt data/43e-6.abkt
abkt_files += data/43f-0.abkt data/43f-1.abkt data/43f-2.abkt data/43f-200.abkt data/43f-3.abkt data/43f-6.abkt data/456-0.abkt data/456-1.abkt data/456-2.abkt data/456-200.abkt data/456-3.abkt data/456-6.abkt data/464-0.abkt data/464-1.abkt data/464-2.abkt data/464-200.abkt data/464-3.abkt data/464-6.abkt data/804-0.abkt data/804-1.abkt data/804-2.abkt data/804-200.abkt data/804-3.abkt data/804-6.abkt data/816-0.abkt data/816-1.abkt data/816-2.abkt data/816-200.abkt data/816-3.abkt data/816-6.abkt data/81a-0.abkt data/81a-1.abkt data/81a-2.abkt data/81a-200.abkt data/81a-3.abkt data/81a-6.abkt data/8411-0.abkt data/8411-1.abkt data/8411-2.abkt data/8411-200.abkt data/8411-3.abkt data/8411-6.abkt data/c04-0.abkt data/c04-1.abkt data/c04-2.abkt data/c04-200.abkt data/c04-3.abkt data/c04-6.abkt data/c0a-0.abkt data/c0a-1.abkt data/c0a-2.abkt data/c0a-200.abkt data/c0a-3.abkt data/c0a-6.abkt data/c1a-0.abkt data/c1a-1.abkt data/c1a-2.abkt data/c1a-200.abkt data/c1a-3.abkt data/c1a-6.abkt
tzd_files = data/AUS_Central.tzd data/AUS_Eastern.tzd data/Afghanistan.tzd data/Alaskan.tzd data/Aleutian.tzd data/Altai.tzd data/Arab.tzd data/Arabian.tzd data/Arabic.tzd data/Argentina.tzd data/Astrakhan.tzd data/Atlantic.tzd data/Aus_Central_W_.tzd data/Azerbaijan.tzd data/Azores.tzd data/Bahia.tzd data/Bangladesh.tzd data/Belarus.tzd data/Bougainville.tzd data/Canada_Central.tzd data/Cape_Verde.tzd data/Caucasus.tzd data/Cen__Australia.tzd data/Central.tzd data/Central_America.tzd data/Central_Asia.tzd data/Central_Brazilian.tzd data/Central_Europe.tzd data/Central_European.tzd data/Central_Pacific.tzd data/Central__Mexico_.tzd data/Chatham_Islands.tzd data/China.tzd data/Cuba.tzd data/Dateline.tzd data/E__Africa.tzd data/E__Australia.tzd data/E__Europe.tzd data/E__South_America.tzd data/Easter_Island.tzd data/Eastern.tzd data/Eastern__Mexico_.tzd data/Egypt.tzd data/Ekaterinburg.tzd data/FLE.tzd data/Fiji.tzd data/GMT.tzd data/GTB.tzd data/Georgian.tzd data/Greenland.tzd
tzd_files += data/Greenwich.tzd data/Haiti.tzd data/Hawaiian.tzd data/India.tzd data/Iran.tzd data/Israel.tzd data/Jordan.tzd data/Kaliningrad.tzd data/Korea.tzd data/Libya.tzd data/Line_Islands.tzd data/Lord_Howe.tzd data/Magadan.tzd data/Magallanes.tzd data/Marquesas.tzd data/Mauritius.tzd data/Middle_East.tzd data/Montevideo.tzd data/Morocco.tzd data/Mountain.tzd data/Mountain__Mexico_.tzd data/Myanmar.tzd data/N__Central_Asia.tzd data/Namibia.tzd data/Nepal.tzd data/New_Zealand.tzd data/Newfoundland.tzd data/Norfolk.tzd data/North_Asia.tzd data/North_Asia_East.tzd data/North_Korea.tzd data/Omsk.tzd data/Pacific.tzd data/Pacific_SA.tzd data/Pacific__Mexico_.tzd data/Pakistan.tzd data/Paraguay.tzd data/Qyzylorda.tzd data/Romance.tzd data/Russia_Time_Zone_10.tzd data/Russia_Time_Zone_11.tzd data/Russia_Time_Zone_3.tzd data/Russian.tzd data/SA_Eastern.tzd data/SA_Pacific.tzd data/SA_Western.tzd data/SE_Asia.tzd data/Saint_Pierre.tzd data/Sakhalin.tzd data/Samoa.tzd data/Sao_Tome.tzd
tzd_files += data/Saratov.tzd data/Singapore.tzd data/South_Africa.tzd data/South_Sudan.tzd data/Sri_Lanka.tzd data/Sudan.tzd data/Syria.tzd data/Taipei.tzd data/Tasmania.tzd data/Tocantins.tzd data/Tokyo.tzd data/Tomsk.tzd data/Tonga.tzd data/Transbaikal.tzd data/Turkey.tzd data/Turks_And_Caicos.tzd data/US_Eastern.tzd data/US_Mountain.tzd data/UTC+12.tzd data/UTC+13.tzd data/UTC-02.tzd data/UTC-08.tzd data/UTC-09.tzd data/UTC-11.tzd data/UTC.tzd data/Ulaanbaatar.tzd data/Venezuela.tzd data/Vladivostok.tzd data/Volgograd.tzd data/W__Australia.tzd data/W__Central_Africa.tzd data/W__Europe.tzd data/W__Mongolia.tzd data/West_Asia.tzd data/West_Bank.tzd data/West_Pacific.tzd data/Yakutsk.tzd data/Yukon.tzd
tzd_files += data/windowsZones.xml
header_files = include/gromox/ab_tree.hpp include/gromox/algorithm.hpp include/gromox/archive.hpp include/gromox/atomic.hpp include/gromox/authmgr.hpp include/gromox/bounce_gen.hpp include/gromox/clock.hpp include/gromox/common_types.hpp include/gromox/config_file.hpp include/gromox/contexts_pool.hpp include/gromox/cookie_parser.hpp include/gromox/cryptoutil.hpp include/gromox/database.h include/gromox/database_mysql.hpp include/gromox/dbop.h include/gromox/dcerpc.hpp include/gromox/defs.h include/gromox/double_list.hpp include/gromox/dsn.hpp include/gromox/eid_array.hpp include/gromox/element_data.hpp include/gromox/exmdb_allcalls.hpp include/gromox/exmdb_client.hpp include/gromox/exmdb_common_util.hpp include/gromox/exmdb_ext.hpp include/gromox/exmdb_idef.hpp include/gromox/exmdb_provider_client.hpp include/gromox/exmdb_rpc.hpp include/gromox/exmdb_server.hpp include/gromox/ext_buffer.hpp
header_files += include/gromox/fileio.h include/gromox/flat_set.hpp include/gromox/flusher_common.h include/gromox/freebusy.hpp include/gromox/gab.hpp include/gromox/generic_connection.hpp include/gromox/hook_common.h include/gromox/hpm_common.h include/gromox/http.hpp include/gromox/ical.hpp include/gromox/icase.hpp include/gromox/idset.hpp include/gromox/json.hpp include/gromox/list_file.hpp include/gromox/listener_ctx.hpp include/gromox/lzxpress.hpp include/gromox/mail.hpp include/gromox/mail_func.hpp include/gromox/mapi_types.hpp include/gromox/mapidefs.h include/gromox/mapierr.hpp include/gromox/mapitags.hpp include/gromox/midb.hpp include/gromox/midb_agent.hpp include/gromox/mime.hpp include/gromox/mjson.hpp include/gromox/mysql_adaptor.hpp include/gromox/ndr.hpp include/gromox/notify_types.hpp include/gromox/oxcmail.hpp include/gromox/oxoabkt.hpp
header_files += include/gromox/paths.h include/gromox/pcl.hpp include/gromox/plugin.hpp include/gromox/poll_ctx.hpp include/gromox/proc_common.h include/gromox/process.hpp include/gromox/proptag_array.hpp include/gromox/propval.hpp include/gromox/range_set.hpp include/gromox/resource_pool.hpp include/gromox/restriction.hpp include/gromox/rop_util.hpp include/gromox/rpc_types.hpp include/gromox/rule_actions.hpp include/gromox/safeint.hpp include/gromox/simple_tree.hpp include/gromox/sortorder_set.hpp include/gromox/stream.hpp include/gromox/svc_common.h include/gromox/svc_loader.hpp include/gromox/textmaps.hpp include/gromox/threads_pool.hpp include/gromox/tie.hpp include/gromox/tnef.hpp include/gromox/unordered_map_assist.hpp include/gromox/usercvt.hpp include/gromox/util.hpp include/gromox/vcard.hpp include/gromox/xarray2.hpp include/gromox/zcore_allcalls.hpp include/gromox/zcore_client.hpp include/gromox/zcore_rpc.hpp include/gromox/zcore_types.hpp include/gromox/zz_ndr_stack.hpp
if ENABLE_PRIVATE_HEADERS
pkginclude_HEADERS = ${header_files}
endif
list_files = data/cpid.txt data/folder_names.txt data/lang_charset.txt data/lcid.txt data/mime_extension.txt data/propnames.txt
pkgdata_DATA = data/abkt.pak data/timezone.pak
dist_pkgdata_DATA = ${list_files} data/Services.wsdl data/Messages.xsd data/Types.xsd data/gdbinit data/fpm-gromox.conf.sample data/gromox.ldif data/sqliterc tools/conf.php tools/db.php tools/submit.php
EXTRA_DIST += \
	.editorconfig .gitignore LICENSE.txt README.rst default.sym qconf \
	${abkt_files} ${tzd_files} \
	data/local_bounce/ascii/BOUNCE_MAILBOX_FULL data/local_bounce/ascii/BOUNCE_MAIL_DELIVERED data/local_bounce/ascii/BOUNCE_NO_USER data/local_bounce/ascii/BOUNCE_OPERATION_ERROR data/local_bounce/big5/BOUNCE_MAILBOX_FULL data/local_bounce/big5/BOUNCE_MAIL_DELIVERED data/local_bounce/big5/BOUNCE_NO_USER data/local_bounce/big5/BOUNCE_OPERATION_ERROR data/local_bounce/euc-jp/BOUNCE_MAILBOX_FULL data/local_bounce/euc-jp/BOUNCE_MAIL_DELIVERED data/local_bounce/euc-jp/BOUNCE_NO_USER data/local_bounce/euc-jp/BOUNCE_OPERATION_ERROR data/local_bounce/gb2312/BOUNCE_MAILBOX_FULL data/local_bounce/gb2312/BOUNCE_MAIL_DELIVERED data/local_bounce/gb2312/BOUNCE_NO_USER data/local_bounce/gb2312/BOUNCE_OPERATION_ERROR data/local_bounce/gbk/BOUNCE_MAILBOX_FULL data/local_bounce/gbk/BOUNCE_MAIL_DELIVERED data/local_bounce/gbk/BOUNCE_NO_USER data/local_bounce/gbk/BOUNCE_OPERATION_ERROR data/local_bounce/shift-jis/BOUNCE_MAILBOX_FULL data/local_bounce/shift-jis/BOUNCE_MAIL_DELIVERED data/local_bounce/shift-jis/BOUNCE_NO_USER data/local_bounce/shift-jis/BOUNCE_OPERATION_ERROR data/mail_bounce/ascii/BOUNCE_AUTO_RESPONSE data/mail_bounce/ascii/BOUNCE_CANNOT_DISPLAY data/mail_bounce/ascii/BOUNCE_GENERIC_ERROR data/mail_bounce/ascii/BOUNCE_MAIL_TOO_LARGE data/mail_bounce/big5/BOUNCE_AUTO_RESPONSE data/mail_bounce/big5/BOUNCE_CANNOT_DISPLAY data/mail_bounce/big5/BOUNCE_GENERIC_ERROR data/mail_bounce/big5/BOUNCE_MAIL_TOO_LARGE data/mail_bounce/gb2312/BOUNCE_AUTO_RESPONSE data/mail_bounce/gb2312/BOUNCE_CANNOT_DISPLAY data/mail_bounce/gb2312/BOUNCE_GENERIC_ERROR data/mail_bounce/gb2312/BOUNCE_MAIL_TOO_LARGE data/mail_bounce/gbk/BOUNCE_AUTO_RESPONSE data/mail_bounce/gbk/BOUNCE_GENERIC_ERROR data/mail_bounce/gbk/BOUNCE_MAIL_CANNOT_DISPLAY data/mail_bounce/gbk/BOUNCE_MAIL_TOO_LARGE data/mlist_bounce/ascii/BOUNCE_MLIST_DOMAIN data/mlist_bounce/ascii/BOUNCE_MLIST_INTERNAL data/mlist_bounce/ascii/BOUNCE_MLIST_SPECIFIED data/mlist_bounce/big5/BOUNCE_MLIST_DOMAIN data/mlist_bounce/big5/BOUNCE_MLIST_INTERNAL data/mlist_bounce/big5/BOUNCE_MLIST_SPECIFIED data/mlist_bounce/euc-jp/BOUNCE_MLIST_DOMAIN data/mlist_bounce/euc-jp/BOUNCE_MLIST_INTERNAL data/mlist_bounce/euc-jp/BOUNCE_MLIST_SPECIFIED data/mlist_bounce/gb2312/BOUNCE_MLIST_DOMAIN data/mlist_bounce/gb2312/BOUNCE_MLIST_INTERNAL data/mlist_bounce/gb2312/BOUNCE_MLIST_SPECIFIED data/mlist_bounce/gbk/BOUNCE_MLIST_DOMAIN data/mlist_bounce/gbk/BOUNCE_MLIST_INTERNAL data/mlist_bounce/gbk/BOUNCE_MLIST_SPECIFIED data/mlist_bounce/shift-jis/BOUNCE_MLIST_DOMAIN data/mlist_bounce/shift-jis/BOUNCE_MLIST_INTERNAL data/mlist_bounce/shift-jis/BOUNCE_MLIST_SPECIFIED data/notify_bounce/ascii/BOUNCE_NOTIFY_NON_READ data/notify_bounce/ascii/BOUNCE_NOTIFY_READ data/notify_bounce/big5/BOUNCE_NOTIFY_NON_READ data/notify_bounce/big5/BOUNCE_NOTIFY_READ data/notify_bounce/gb2312/BOUNCE_NOTIFY_NON_READ data/notify_bounce/gb2312/BOUNCE_NOTIFY_READ data/notify_bounce/gbk/BOUNCE_NOTIFY_NON_READ data/notify_bounce/gbk/BOUNCE_NOTIFY_READ \
	doc/changelog.rst doc/charset.rst doc/commchan.svg doc/downgrade.rst doc/error_codes.rst doc/exmdb.html doc/ews_spec.rst doc/faq.rst doc/folderrefs.txt doc/glossary.rst doc/install.rst doc/known_bugs.rst doc/mascot.svg doc/mtformat.rst doc/outlook_oof_spec.rst doc/outlook_rule_spec.rst doc/oxoabkt.rst doc/oxocal_notes.rst doc/protocols.rst doc/string_props.rst doc/user_properties.rst \
	${header_files} include/gromox/paths.h.in lib/mapi/oxcmail_int.hpp \
	php_mapi/mapi.stub.php \
	system/gromox-delivery-queue.tps system/gromox-delivery.tps system/gromox-event.tps system/gromox-http.tps system/gromox-imap.tps system/gromox-istore.tps system/gromox-midb.tps system/gromox-pop3.tps system/gromox-snapshot.tps system/gromox-timer.tps system/gromox-zcore.tps \
	system/selinux/gromox.fc system/selinux/gromox.if system/selinux/gromox.te system/selinux/readme.rst \
	tests/eps_1_01_03.b tests/eps_1_02.b tests/eps_1_04.b tests/eps_2_05.b tests/epv_1.b tests/epv_2.b tests/epv_3.b tests/epv_4.b \
	tests/gxl-475.ics tests/gxl-598.ics tests/httppipe.pl tests/mainstub.cpp tests/zlogin.php \
	tools/abtohex tools/create_k2g_migration_lists.sh tools/defs2php.pl tools/defs2php.sh tools/duplogid tools/enumsort tools/exchange2grommunio.ps1 tools/exmidl.pl tools/exmidl.sh tools/genmails tools/hunpack tools/includesort tools/kopano2grommunio.sh tools/mpak.pl tools/mpak.sh tools/procnames tools/proptagsort tools/smtpaddr.cpp tools/smtpaddr.rst tools/stackusage tools/tzdef_decode tools/warncount tools/zcidl.pl tools/zcidl.sh

data/abkt.pak: ${abkt_files}
	${AM_V_GEN}${MKDIR_P} data
	${AM_V_at}${srcdir}/tools/mpak.sh "${srcdir}" ${abkt_files} >$@

data/timezone.pak: ${tzd_files}
	${AM_V_GEN}${MKDIR_P} data
	${AM_V_at}${srcdir}/tools/mpak.sh "${srcdir}" ${tzd_files} >$@

include/gromox/paths.h: include/gromox/paths.h.in ${top_builddir}/config.status
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}sed -e 's|#define PKGSYSCONFDIR .*|#define PKGSYSCONFDIR "${sysconfdir}/${PACKAGE_NAME}"|' \
	 -e 's|#define PKGLIBDIR .*|#define PKGLIBDIR "${pkglibdir}"|' \
	 -e 's|#define PKGLIBEXECDIR .*|#define PKGLIBEXECDIR "${pkglibexecdir}"|' \
	 -e 's|#define DATADIR .*|#define DATADIR "${datadir}"|' \
	 -e 's|#define LOCALSTATEDIR .*|#define LOCALSTATEDIR "${localstatedir}"|' \
	 -e 's|#define PKGDATADIR .*|#define PKGDATADIR "${pkgdatadir}"|' \
		<${srcdir}/include/gromox/paths.h.in >"$@.tmp"
	${AM_V_at}if ! cmp "$@" "$@.tmp" >/dev/null 2>/dev/null; then mv "$@.tmp" "$@"; fi; rm -f "$@.tmp"

include/mapierr.cpp: include/gromox/mapierr.hpp tools/defs2php.sh tools/defs2php.pl
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}${srcdir}/tools/defs2php.sh -e <${srcdir}/include/gromox/mapierr.hpp >"$@"

include/mapitags.cpp: include/gromox/mapitags.hpp tools/defs2php.sh tools/defs2php.pl
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}${srcdir}/tools/defs2php.sh -t <${srcdir}/include/gromox/mapitags.hpp >"$@"

php_mapi/zrpc.cpp: include/gromox/zcore_client.hpp tools/zcidl.sh tools/zcidl.pl
	${AM_V_GEN}${MKDIR_P} php_mapi
	${AM_V_at}${srcdir}/tools/zcidl.sh --client <${srcdir}/include/gromox/zcore_client.hpp >"$@"

include/zrpc_dispatch.cpp: include/gromox/zcore_client.hpp tools/zcidl.sh tools/zcidl.pl
	${AM_V_GEN}${MKDIR_P} php_mapi
	${AM_V_at}${srcdir}/tools/zcidl.sh --server <${srcdir}/include/gromox/zcore_client.hpp >"$@"

lib/exmdb_rpc.cpp: include/gromox/exmdb_idef.hpp tools/exmidl.sh tools/exmidl.pl
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}${srcdir}/tools/exmidl.sh --client <${srcdir}/include/gromox/exmdb_idef.hpp >"$@"

include/exmdb_dispatch.cpp: include/gromox/exmdb_idef.hpp tools/exmidl.sh tools/exmidl.pl
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}${srcdir}/tools/exmidl.sh --server <${srcdir}/include/gromox/exmdb_idef.hpp >"$@"

exch/exmdb/rpc.cpp: include/gromox/exmdb_idef.hpp tools/exmidl.sh tools/exmidl.pl
	${AM_V_GEN}${MKDIR_P} include/gromox
	${AM_V_at}${srcdir}/tools/exmidl.sh --shm-api <${srcdir}/include/gromox/exmdb_idef.hpp >"$@"

install-exec-hook:
	${MKDIR_P} ${DESTDIR}${sbindir}

install-data-local:
	${MKDIR_P} ${DESTDIR}${mandir}/man8 ${DESTDIR}${pkgdatadir}/http/php
	cp -av ${srcdir}/data/*_bounce ${srcdir}/data/*.txt ${srcdir}/data/*.ldif ${srcdir}/data/*.sample ${srcdir}/data/gdbinit ${srcdir}/data/sqliterc ${DESTDIR}${pkgdatadir}/

uninstall-hook:
	chmod -R u+w ${DESTDIR}${pkgdatadir}/
	rm -Rf ${DESTDIR}${pkgdatadir}/

# On cross-compilation, dldcheck may fail to run, so allow exit code 126 (e.g. Linux) to pass
dldcheck_files = ${lib_LTLIBRARIES} ${pkglib_LTLIBRARIES} ${pamlib_LTLIBRARIES}
dldcheck.stamp: dldcheck ${dldcheck_files}
	${AM_V_GEN}LD_LIBRARY_PATH="${abs_builddir}/.libs:$$LD_LIBRARY_PATH" ./dldcheck "$@" ${dldcheck_files}; rv="$$?"; test "$$rv" != 2

%.service: ${top_builddir}/config.status
.tps.service:
	${AM_V_GEN}${MKDIR_P} system; ${SED} -e 's|@''libexecdir''@|${libexecdir}|g' <$< >$@

.PHONY: header-presence

header-presence:
	@echo ${header_files} | sed -e 's/ /\n/g' | sort -u >hdrinstalled.o
	@echo include/gromox/*.h include/gromox/*.hpp | sed -e 's/ /\n/g' | sort -u >hdrpresent.o
	${AM_V_GEN}diff -dpru hdrinstalled.o hdrpresent.o
