4c78d9e646c4a1158d7167806937c02d86cdfc25Aki TuomiAM_CPPFLAGS = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-test \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-settings \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-master \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-mail \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-dict \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-index \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-storage/index \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-storage \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-dcrypt \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/lib-fs \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/doveadm \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi -I$(top_srcdir)/src/plugins/acl
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomiif SSL_VERSION_GE_102
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomitest_options =
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomielse !SSL_VERSION_GE_102
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomitest_options = NOUNDEF=1
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomiendif !SSL_VERSION_GE_102
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomidoveadm_moduledir = $(moduledir)/doveadm
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki TuomiNOPLUGIN_LDFLAGS =
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomimodule_LTLIBRARIES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi lib10_mail_crypt_plugin.la \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi lib05_mail_crypt_acl_plugin.la \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi libfs_crypt.la \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi libfs_mail_crypt.la
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomidoveadm_module_LTLIBRARIES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi libdoveadm_mail_crypt_plugin.la
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib10_mail_crypt_plugin_la_LDFLAGS = -module -avoid-version
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib10_mail_crypt_plugin_la_LIBADD = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi $(LIBDCRYPT_LIBS) \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib05_mail_crypt_acl_plugin_la_LDFLAGS = -module -avoid-version
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomiif DOVECOT_PLUGIN_DEPS
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib05_mail_crypt_acl_plugin_la_LIBADD = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi $(LIBDCRYPT_LIBS) \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi lib10_mail_crypt_plugin.la
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomiendif
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib10_mail_crypt_plugin_la_SOURCES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-userenv.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-plugin.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilib05_mail_crypt_acl_plugin_la_SOURCES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-acl-plugin.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_crypt_la_SOURCES = fs-crypt.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-pluginenv.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi fs-crypt-settings.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_crypt_la_LIBADD = $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_crypt_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_crypt_la_LDFLAGS = -module -avoid-version
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_mail_crypt_la_SOURCES = fs-mail-crypt.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-userenv.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_mail_crypt_la_LIBADD = $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_mail_crypt_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibfs_mail_crypt_la_LDFLAGS = -module -avoid-version
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibdoveadm_mail_crypt_plugin_la_SOURCES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi doveadm-mail-crypt.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibdoveadm_mail_crypt_plugin_la_LIBADD = $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibdoveadm_mail_crypt_plugin_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomilibdoveadm_mail_crypt_plugin_la_LDFLAGS = -module -avoid-version
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_programs = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi test-mail-global-key \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi test-mail-key
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_global_key_SOURCES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi test-mail-global-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi fs-crypt-settings.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_global_key_LDADD = $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_global_key_DEPENDENCIES = $(LIBDOVECOT_DEPS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_global_key_LDFLAGS = $(DOVECOT_BINARY_LDFLAGS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_global_key_CFLAGS = $(AM_CPPFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\"
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_key_SOURCES = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi test-mail-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.c \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-userenv.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
9eec3f335b9c1763c9874acf9e40c550d4601092Timo Sirainentest_mail_key_LDADD = $(LIBDOVECOT_STORAGE) $(LIBDOVECOT)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_key_DEPENDENCIES = $(LIBDOVECOT_DEPS) $(LIBDOVECOT_STORAGE_DEPS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_key_LDFLAGS = $(DOVECOT_BINARY_LDFLAGS)
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomitest_mail_key_CFLAGS = $(AM_CPPFLAGS) $(DOVECOT_BINARY_CFLAGS) -Dtop_builddir=\"$(top_builddir)\"
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki TuomiEXTRA_DIST = fs-crypt-common.c
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuominoinst_HEADERS = \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-plugin.h \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-common.h \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-global-key.h \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi mail-crypt-key.h \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi fs-crypt-settings.h
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
149299c7d5136a8fb425ef3cf8953026a1358002Timo Sirainencheck-local:
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi for bin in $(test_programs); do \
e6459e62bb5e9c1fd9baeca758860a99c6d60509Aki Tuomi if ! env $(test_options) $(RUN_TEST) ./$$bin; then exit 1; fi; \
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi done
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuomi
4c78d9e646c4a1158d7167806937c02d86cdfc25Aki Tuominoinst_PROGRAMS = $(test_programs)