-moduledir = $(libdir)/cryptsetup
+SUBDIRS = crypto_backend luks1 loopaes verity
-if BUILD_LIBDEVMAPPER
-_LIBDEVMAPPER_LIBADD = @LIBDEVMAPPER_LIBS@
-_LIBDEVMAPPER_SOURCES = libdevmapper.c
-_LIBDEVMAPPER_CFLAGS = -DBUILTIN_LIBDEVMAPPER
-endif
-libbbackend_devmapper_la_SOURCES = libdevmapper.c
-libbbackend_devmapper_la_LDFLAGS = -avoid-version -module
-libbbackend_devmapper_la_LIBADD = @LIBDEVMAPPER_LIBS@
-if SHARED_LIBDEVMAPPER
-_LIBDEVMAPPER_SHLIB = libbbackend_devmapper.la
-endif
+moduledir = $(libdir)/cryptsetup
-if BUILD_LIBGCRYPT
-_LIBGCRYPT_LIBADD = @LIBGCRYPT_LIBS@
-_LIBGCRYPT_SOURCES = gcrypt.c
-_LIBGCRYPT_CFLAGS = -DBUILTIN_GCRYPT
-endif
-libcrypto_gcrypt_la_SOURCES = gcrypt.c
-libcrypto_gcrypt_la_LDFLAGS = -avoid-version -module
-libcrypto_gcrypt_la_LIBADD = @LIBGCRYPT_LIBS@
-if SHARED_LIBGCRYPT
-_LIBGCRYPT_SHLIB = libcrypto_gcrypt.la
-endif
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libcryptsetup.pc
INCLUDES = \
-I$(top_srcdir) \
- -I$(top_srcdir)/luks \
+ -I$(top_srcdir)/lib/crypto_backend \
+ -I$(top_srcdir)/lib/luks1 \
+ -I$(top_srcdir)/lib/loopaes \
+ -I$(top_srcdir)/lib/verity \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DPREFIX=\""$(prefix)"\" \
-DVERSION=\""$(VERSION)"\" \
-D_GNU_SOURCE \
-D_LARGEFILE64_SOURCE \
- -D_FILE_OFFSET_BITS=64 \
- @LIBDEVMAPPER_CFLAGS@ \
- $(_LIBDEVMAPPER_CFLAGS) \
- @LIBGCRYPT_CFLAGS@ \
- $(_LIBGCRYPT_CFLAGS)
+ -D_FILE_OFFSET_BITS=64
-lib_LTLIBRARIES = \
- libcryptsetup.la
+lib_LTLIBRARIES = libcryptsetup.la
-module_LTLIBRARIES = \
- $(_LIBDEVMAPPER_SHLIB) \
- $(_LIBGCRYPT_SHLIB)
+common_ldadd = \
+ crypto_backend/libcrypto_backend.la \
+ luks1/libluks1.la \
+ loopaes/libloopaes.la \
+ verity/libverity.la
-if STATIC_LIBRARY
-_STATIC_LIBRARY = -static
-endif
+libcryptsetup_la_DEPENDENCIES = $(common_ldadd) libcryptsetup.sym
libcryptsetup_la_LDFLAGS = \
- $(_STATIC_LIBRARY)
+ -Wl,--version-script=$(top_srcdir)/lib/libcryptsetup.sym \
+ -version-info @LIBCRYPTSETUP_VERSION_INFO@
-libcryptsetup_la_CFLAGS = -Wall
+libcryptsetup_la_CFLAGS = -Wall @CRYPTO_CFLAGS@
libcryptsetup_la_LIBADD = \
- $(_LIBDEVMAPPER_LIBADD) \
- $(_LIBGCRYPT_LIBADD) \
@UUID_LIBS@ \
- ../luks/libluks.la
+ @DEVMAPPER_LIBS@ \
+ @CRYPTO_LIBS@ \
+ @FIPSCHECK_LIBS@ \
+ $(common_ldadd)
+
libcryptsetup_la_SOURCES = \
setup.c \
internal.h \
- blockdev.h \
+ nls.h \
libcryptsetup.h \
utils.c \
- backends.c \
- $(_LIBDEVMAPPER_SOURCES) \
- $(_LIBGCRYPT_SOURCES)
+ utils_crypt.c \
+ utils_crypt.h \
+ utils_debug.c \
+ utils_loop.c \
+ utils_loop.h \
+ utils_devpath.c \
+ utils_wipe.c \
+ utils_fips.c \
+ utils_fips.h \
+ libdevmapper.c \
+ utils_dm.h \
+ volumekey.c \
+ random.c \
+ crypt_plain.c
+
+include_HEADERS = libcryptsetup.h
-include_HEADERS = \
- libcryptsetup.h
+EXTRA_DIST = libcryptsetup.pc.in libcryptsetup.sym