Use non-recursive automake.

This change also causes that now binaries and libraries are placed in
build root directory.

Now we can use subdir-objects for automake.
This commit is contained in:
Milan Broz
2017-10-11 13:18:37 +02:00
parent 892b80ffa4
commit d77bbe93c1
38 changed files with 359 additions and 440 deletions

View File

@@ -1,129 +0,0 @@
AM_CPPFLAGS = -include config.h \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
-DDATADIR=\""$(datadir)"\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DLIBDIR=\""$(libdir)"\" \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DVERSION=\""$(VERSION)"\"
# cryptsetup
cryptsetup_SOURCES = \
$(top_builddir)/lib/utils_crypt.c \
$(top_builddir)/lib/utils_loop.c \
utils_tools.c \
utils_password.c \
cryptsetup.c \
cryptsetup.h
cryptsetup_LDADD = -lm \
$(top_builddir)/lib/libcryptsetup.la \
@POPT_LIBS@ \
@PWQUALITY_LIBS@ \
@PASSWDQC_LIBS@ \
@UUID_LIBS@
cryptsetup_CFLAGS = $(AM_CFLAGS) -Wall
sbin_PROGRAMS=cryptsetup
if STATIC_TOOLS
sbin_PROGRAMS += cryptsetup.static
cryptsetup_static_SOURCES = $(cryptsetup_SOURCES)
cryptsetup_static_CFLAGS = $(cryptsetup_CFLAGS)
cryptsetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
cryptsetup_static_LDADD = $(cryptsetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@PWQUALITY_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
# veritysetup
if VERITYSETUP
veritysetup_SOURCES = \
$(top_builddir)/lib/utils_crypt.c \
$(top_builddir)/lib/utils_loop.c \
utils_tools.c \
veritysetup.c \
cryptsetup.h
veritysetup_LDADD = -lm \
$(top_builddir)/lib/libcryptsetup.la \
@POPT_LIBS@
veritysetup_CFLAGS = $(cryptsetup_CFLAGS)
sbin_PROGRAMS += veritysetup
if STATIC_TOOLS
sbin_PROGRAMS += veritysetup.static
veritysetup_static_SOURCES = $(veritysetup_SOURCES)
veritysetup_static_CFLAGS = $(veritysetup_CFLAGS)
veritysetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
veritysetup_static_LDADD = $(veritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif
# integritysetup
if INTEGRITYSETUP
integritysetup_SOURCES = \
$(top_builddir)/lib/utils_crypt.c \
$(top_builddir)/lib/utils_loop.c \
utils_tools.c \
integritysetup.c \
cryptsetup.h
integritysetup_LDADD = -lm \
$(top_builddir)/lib/libcryptsetup.la \
@POPT_LIBS@ \
@UUID_LIBS@
integritysetup_CFLAGS = $(cryptsetup_CFLAGS)
sbin_PROGRAMS += integritysetup
if STATIC_TOOLS
sbin_PROGRAMS += integritysetup.static
integritysetup_static_SOURCES = $(integritysetup_SOURCES)
integritysetup_static_CFLAGS = $(integritysetup_CFLAGS)
integritysetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
integritysetup_static_LDADD = $(integritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif
# reencrypt
if REENCRYPT
cryptsetup_reencrypt_SOURCES = \
$(top_builddir)/lib/utils_crypt.c \
utils_tools.c \
utils_password.c \
cryptsetup_reencrypt.c \
cryptsetup.h
cryptsetup_reencrypt_LDADD = $(cryptsetup_LDADD) \
@UUID_LIBS@
cryptsetup_reencrypt_CFLAGS = $(cryptsetup_CFLAGS)
sbin_PROGRAMS += cryptsetup-reencrypt
if STATIC_TOOLS
sbin_PROGRAMS += cryptsetup-reencrypt.static
cryptsetup_reencrypt_static_SOURCES = $(cryptsetup_reencrypt_SOURCES)
cryptsetup_reencrypt_static_CFLAGS = $(cryptsetup_reencrypt_CFLAGS)
cryptsetup_reencrypt_static_LDFLAGS = $(AM_LDFLAGS) -all-static
cryptsetup_reencrypt_static_LDADD = $(cryptsetup_reencrypt_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif

114
src/Makemodule.am Normal file
View File

@@ -0,0 +1,114 @@
# cryptsetup
cryptsetup_SOURCES = \
lib/utils_crypt.c \
lib/utils_loop.c \
src/utils_tools.c \
src/utils_password.c \
src/cryptsetup.c \
src/cryptsetup.h
cryptsetup_LDADD = -lm \
libcryptsetup.la \
@POPT_LIBS@ \
@PWQUALITY_LIBS@ \
@PASSWDQC_LIBS@ \
@UUID_LIBS@
sbin_PROGRAMS += cryptsetup
if STATIC_TOOLS
sbin_PROGRAMS += cryptsetup.static
cryptsetup_static_SOURCES = $(cryptsetup_SOURCES)
cryptsetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
cryptsetup_static_LDADD = \
$(cryptsetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@PWQUALITY_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@
endif
# veritysetup
if VERITYSETUP
veritysetup_SOURCES = \
lib/utils_crypt.c \
lib/utils_loop.c \
src/utils_tools.c \
src/veritysetup.c \
src/cryptsetup.h
veritysetup_LDADD = -lm \
libcryptsetup.la \
@POPT_LIBS@
sbin_PROGRAMS += veritysetup
if STATIC_TOOLS
sbin_PROGRAMS += veritysetup.static
veritysetup_static_SOURCES = $(veritysetup_SOURCES)
veritysetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
veritysetup_static_LDADD = \
$(veritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif
# integritysetup
if INTEGRITYSETUP
integritysetup_SOURCES = \
lib/utils_crypt.c \
lib/utils_loop.c \
src/utils_tools.c \
src/integritysetup.c \
src/cryptsetup.h
integritysetup_LDADD = -lm \
libcryptsetup.la \
@POPT_LIBS@ \
@UUID_LIBS@
sbin_PROGRAMS += integritysetup
if STATIC_TOOLS
sbin_PROGRAMS += integritysetup.static
integritysetup_static_SOURCES = $(integritysetup_SOURCES)
integritysetup_static_LDFLAGS = $(AM_LDFLAGS) -all-static
integritysetup_static_LDADD = \
$(integritysetup_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@ \
@UUID_LIBS@
endif
endif
# reencrypt
if REENCRYPT
cryptsetup_reencrypt_SOURCES = \
lib/utils_crypt.c \
src/utils_tools.c \
src/utils_password.c \
src/cryptsetup_reencrypt.c \
src/cryptsetup.h
cryptsetup_reencrypt_LDADD = -lm \
libcryptsetup.la \
@POPT_LIBS@ \
@PWQUALITY_LIBS@ \
@PASSWDQC_LIBS@ \
@UUID_LIBS@
sbin_PROGRAMS += cryptsetup-reencrypt
if STATIC_TOOLS
sbin_PROGRAMS += cryptsetup-reencrypt.static
cryptsetup_reencrypt_static_SOURCES = $(cryptsetup_reencrypt_SOURCES)
cryptsetup_reencrypt_static_LDFLAGS = $(AM_LDFLAGS) -all-static
cryptsetup_reencrypt_static_LDADD = \
$(cryptsetup_reencrypt_LDADD) \
@CRYPTO_STATIC_LIBS@ \
@DEVMAPPER_STATIC_LIBS@
endif
endif