316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuominoinst_LTLIBRARIES = libdcrypt.la
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomipkglib_LTLIBRARIES =
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
f49f1c5fa6a9a55a194e5ada042df134907278f4Aki TuomiNOPLUGIN_LDFLAGS=
f49f1c5fa6a9a55a194e5ada042df134907278f4Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki TuomiAM_CPPFLAGS = \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi -I$(top_srcdir)/src/lib \
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen -I$(top_srcdir)/src/lib-test \
b3a968f434cbb9e374ea3da0a7d493e20231a4aeAki Tuomi -I$(top_srcdir)/src/lib-ssl-iostream \
b3a968f434cbb9e374ea3da0a7d493e20231a4aeAki Tuomi -DDCRYPT_MODULE_DIR=\"$(pkglibdir)\"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomilibdcrypt_la_SOURCES = \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi dcrypt.c \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi istream-decrypt.c \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi ostream-encrypt.c
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomilibdcrypt_la_CFLAGS = $(AM_CPPFLAGS) \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi -DDCRYPT_MODULE_DIR=\"$(pkglibdir)\"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
cd24dc2196f7480d4793ca5d5f9f8d70741bc103Aki Tuomiif BUILD_DCRYPT_OPENSSL
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomipkglib_LTLIBRARIES += libdcrypt_openssl.la
452d0005a47c6872590346f5ea8b247974689ac9Aki Tuomilibdcrypt_openssl_la_SOURCES = dcrypt-openssl.c
c6108c1bfa10d5fcd1def9c6a23ebcd5204d1775Timo Sirainenlibdcrypt_openssl_la_LDFLAGS = -module -avoid-version ../lib-ssl-iostream/libssl_iostream_openssl.la
345f36ebc7dd445cfa3dbf157342d110cc74d7c7Aki Tuomilibdcrypt_openssl_la_LIBADD = $(SSL_LIBS)
c6108c1bfa10d5fcd1def9c6a23ebcd5204d1775Timo Sirainenlibdcrypt_openssl_la_DEPENDENCIES = ../lib-ssl-iostream/libssl_iostream_openssl.la
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomilibdcrypt_openssl_la_CFLAGS = $(AM_CPPFLAGS) \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi $(SSL_CFLAGS)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiendif
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiheaders = \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi dcrypt.h \
17fbd200b78112bd0d89e89598aa01cea72a74e5Martti Rannanjärvi dcrypt-iostream.h \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi dcrypt-private.h \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi ostream-encrypt.h \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi istream-decrypt.h
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomipkginc_libdir=$(pkgincludedir)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomipkginc_lib_HEADERS = $(headers)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki TuomiEXTRA_DIST = \
de1c645a79d42c37dffb7f52e9c643b6251fdcd0Aki Tuomi sample-v1.asc \
7c9a9ac8cd5652f0e12a24b07c8559a7be0f5554Timo Sirainen sample-v1_short.asc \
de1c645a79d42c37dffb7f52e9c643b6251fdcd0Aki Tuomi sample-v2.asc
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
7e1a69e513739a7c12e3c5ec53dff1eb01b90524Aki Tuomitest_programs = test-crypto test-stream
7e1a69e513739a7c12e3c5ec53dff1eb01b90524Aki Tuominoinst_PROGRAMS = $(test_programs)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
149299c7d5136a8fb425ef3cf8953026a1358002Timo Sirainencheck-local:
7e1a69e513739a7c12e3c5ec53dff1eb01b90524Aki Tuomi for bin in $(test_programs); do \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi done
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo SirainenLIBDOVECOT_TEST_DEPS = \
f089a10e4816e772992346c9837ec10db3894c65Timo Sirainen ../lib-ssl-iostream/libssl_iostream.la \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi ../lib-test/libtest.la \
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo Sirainen ../lib/liblib.la
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo SirainenLIBDOVECOT_TEST = \
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo Sirainen $(LIBDOVECOT_TEST_DEPS) \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi $(MODULE_LIBS)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomitest_crypto_LDADD = $(LIBDOVECOT_TEST)
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo Sirainentest_crypto_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS)
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomiif HAVE_WHOLE_ARCHIVE
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomitest_crypto_LDFLAGS = -Wl,$(LD_WHOLE_ARCHIVE),../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE)
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomiendif
b3a968f434cbb9e374ea3da0a7d493e20231a4aeAki Tuomitest_crypto_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomitest_crypto_SOURCES = $(libdcrypt_la_SOURCES) test-crypto.c
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomitest_stream_LDADD = $(LIBDOVECOT_TEST)
ff95c6488eb3239654ed7fd51ed787a6b2c44506Timo Sirainentest_stream_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS)
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomiif HAVE_WHOLE_ARCHIVE
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomitest_stream_LDFLAGS = -Wl,$(LD_WHOLE_ARCHIVE),../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE)
86ad487452c763152f3ff4dd4650512f3cecdc55Aki Tuomiendif
b3a968f434cbb9e374ea3da0a7d493e20231a4aeAki Tuomitest_stream_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomitest_stream_SOURCES = $(libdcrypt_la_SOURCES) test-stream.c