pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA += lib/libcryptsetup.pc

lib_LTLIBRARIES += libcryptsetup.la

noinst_LTLIBRARIES += libutils_io.la

include_HEADERS += lib/libcryptsetup.h

EXTRA_DIST += lib/libcryptsetup.pc.in lib/libcryptsetup.sym

libutils_io_la_CFLAGS = $(AM_CFLAGS)

libutils_io_la_SOURCES = \
	lib/utils_io.c			\
	lib/utils_io.h

libcryptsetup_la_CPPFLAGS = $(AM_CPPFLAGS)

libcryptsetup_la_DEPENDENCIES = libutils_io.la libcrypto_backend.la lib/libcryptsetup.sym

libcryptsetup_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined \
	-Wl,--version-script=$(top_srcdir)/lib/libcryptsetup.sym \
	-version-info @LIBCRYPTSETUP_VERSION_INFO@

libcryptsetup_la_CFLAGS = $(AM_CFLAGS) @CRYPTO_CFLAGS@

libcryptsetup_la_LIBADD = \
	@UUID_LIBS@		\
	@DEVMAPPER_LIBS@	\
	@CRYPTO_LIBS@		\
	@LIBARGON2_LIBS@	\
	@JSON_C_LIBS@		\
	@BLKID_LIBS@		\
	@DL_LIBS@		\
	$(LTLIBINTL)		\
	libcrypto_backend.la	\
	libutils_io.la

libcryptsetup_la_SOURCES = \
	lib/setup.c			\
	lib/internal.h			\
	lib/bitops.h			\
	lib/nls.h			\
	lib/libcryptsetup.h		\
	lib/libcryptsetup_macros.h	\
	lib/libcryptsetup_symver.h	\
	lib/utils.c			\
	lib/utils_benchmark.c		\
	lib/utils_crypt.c		\
	lib/utils_crypt.h		\
	lib/utils_loop.c		\
	lib/utils_loop.h		\
	lib/utils_devpath.c		\
	lib/utils_wipe.c		\
	lib/utils_device.c		\
	lib/utils_keyring.c		\
	lib/utils_keyring.h		\
	lib/utils_device_locking.c	\
	lib/utils_device_locking.h	\
	lib/utils_pbkdf.c		\
	lib/utils_safe_memory.c		\
	lib/utils_storage_wrappers.c	\
	lib/utils_storage_wrappers.h	\
	lib/libdevmapper.c		\
	lib/utils_dm.h			\
	lib/volumekey.c			\
	lib/random.c			\
	lib/crypt_plain.c		\
	lib/integrity/integrity.h	\
	lib/integrity/integrity.c	\
	lib/loopaes/loopaes.h		\
	lib/loopaes/loopaes.c		\
	lib/tcrypt/tcrypt.h		\
	lib/tcrypt/tcrypt.c		\
	lib/keyslot_context.h		\
	lib/keyslot_context.c		\
	lib/luks1/af.h			\
	lib/luks1/af.c			\
	lib/luks1/keyencryption.c	\
	lib/luks1/keymanage.c		\
	lib/luks1/luks.h		\
	lib/verity/verity_hash.c	\
	lib/verity/verity_fec.c		\
	lib/verity/verity.c		\
	lib/verity/verity.h		\
	lib/verity/rs_encode_char.c	\
	lib/verity/rs_decode_char.c	\
	lib/verity/rs.h		\
	lib/luks2/luks2_disk_metadata.c	\
	lib/luks2/luks2_json_format.c	\
	lib/luks2/luks2_json_metadata.c	\
	lib/luks2/luks2_luks1_convert.c	\
	lib/luks2/luks2_digest.c	\
	lib/luks2/luks2_digest_pbkdf2.c	\
	lib/luks2/luks2_keyslot.c	\
	lib/luks2/luks2_keyslot_luks2.c	\
	lib/luks2/luks2_keyslot_reenc.c	\
	lib/luks2/luks2_reencrypt.c	\
	lib/luks2/luks2_reencrypt_digest.c	\
	lib/luks2/luks2_segment.c	\
	lib/luks2/luks2_token_keyring.c	\
	lib/luks2/luks2_token.c		\
	lib/luks2/luks2_internal.h	\
	lib/luks2/luks2.h		\
	lib/luks2/hw_opal/hw_opal.c	\
	lib/luks2/hw_opal/hw_opal.h	\
	lib/utils_blkid.c		\
	lib/utils_blkid.h		\
	lib/bitlk/bitlk.h		\
	lib/bitlk/bitlk.c		\
	lib/fvault2/fvault2.h		\
	lib/fvault2/fvault2.c
