|
Packit Bot |
e13ba5 |
#
|
|
Packit Bot |
e13ba5 |
# Copyright (c) 2002, 2007 SuSE Linux AG, Germany
|
|
Packit Bot |
e13ba5 |
#
|
|
Packit Bot |
e13ba5 |
# Author: Thorsten Kukuk <kukuk@suse.de>
|
|
Packit Bot |
e13ba5 |
#
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
AUTOMAKE_OPTIONS = 1.14 gnits
|
|
Packit Bot |
e13ba5 |
ACLOCAL_AMFLAGS = -I m4
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
AM_CFLAGS = $(WARN_CFLAGS)
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
EXTRA_DIST = \
|
|
Packit Bot |
e13ba5 |
LICENSING THANKS \
|
|
Packit Bot |
e13ba5 |
libcrypt.map.in libcrypt.minver \
|
|
Packit Bot |
e13ba5 |
gen-map.awk gen-vers.awk gen-crypt-h.awk \
|
|
Packit Bot |
e13ba5 |
gen-hashes.awk sel-hashes.awk hashes.lst
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
720d0b |
notrans_dist_man3_MANS = crypt.3 crypt_r.3 crypt_ra.3 \
|
|
Packit Bot |
720d0b |
crypt_rn.3 crypt_gensalt.3
|
|
Packit Bot |
e13ba5 |
notrans_dist_man5_MANS = crypt.5
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
nodist_include_HEADERS = crypt.h
|
|
Packit Bot |
e13ba5 |
nodist_noinst_HEADERS = crypt-hashes.h
|
|
Packit Bot |
e13ba5 |
noinst_HEADERS = \
|
|
Packit Bot |
e13ba5 |
alg-des.h alg-hmac-sha1.h alg-md4.h alg-md5.h \
|
|
Packit Bot |
e13ba5 |
alg-sha1.h alg-sha256.h alg-sha512.h byteorder.h \
|
|
Packit Bot |
e13ba5 |
crypt-base.h crypt-obsolete.h crypt-private.h \
|
|
Packit Bot |
e13ba5 |
crypt-port.h test-des-cases.h
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
lib_LTLIBRARIES = libcrypt.la
|
|
Packit Bot |
e13ba5 |
libcrypt_la_SOURCES = \
|
|
Packit Bot |
e13ba5 |
alg-des.c alg-des-tables.c alg-hmac-sha1.c alg-md4.c alg-md5.c \
|
|
Packit Bot |
e13ba5 |
alg-sha1.c alg-sha256.c alg-sha512.c \
|
|
Packit Bot |
e13ba5 |
crypt.c crypt-bcrypt.c crypt-des.c crypt-gensalt-static.c \
|
|
Packit Bot |
e13ba5 |
crypt-gensalt.c crypt-md5.c crypt-nthash.c crypt-pbkdf1-sha1.c \
|
|
Packit Bot |
e13ba5 |
crypt-sha256.c crypt-sha512.c crypt-static.c crypt-sunmd5.c \
|
|
Packit Bot |
e13ba5 |
randombytes.c
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
pkgconfig_DATA = libxcrypt.pc
|
|
Packit Bot |
e13ba5 |
# Install libcrypt.pc symlink to libxcrypt.pc file.
|
|
Packit Bot |
e13ba5 |
phony_targets = \
|
|
Packit Bot |
e13ba5 |
install-data-hook-pkgconfig uninstall-hook-pkgconfig
|
|
Packit Bot |
e13ba5 |
install-data-hook: install-data-hook-pkgconfig
|
|
Packit Bot |
e13ba5 |
uninstall_hook_targets = \
|
|
Packit Bot |
e13ba5 |
uninstall-hook-pkgconfig
|
|
Packit Bot |
e13ba5 |
install-data-hook-pkgconfig:
|
|
Packit Bot |
e13ba5 |
cd $(DESTDIR)$(pkgconfigdir) && \
|
|
Packit Bot |
e13ba5 |
$(LN_S) libxcrypt.pc libcrypt.pc
|
|
Packit Bot |
e13ba5 |
uninstall-hook-pkgconfig:
|
|
Packit Bot |
e13ba5 |
-rm -f $(DESTDIR)$(pkgconfigdir)/libcrypt.pc
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
# Build libcrypt.so.2 if obsolete APIs are excluded, libcrypt.so.1 otherwise.
|
|
Packit Bot |
e13ba5 |
if ENABLE_OBSOLETE_API
|
|
Packit Bot |
e13ba5 |
libcrypt_la_VERSION = 2:0:1
|
|
Packit Bot |
e13ba5 |
else
|
|
Packit Bot |
e13ba5 |
libcrypt_la_VERSION = 2:0:0
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
libcrypt_la_LDFLAGS = \
|
|
Packit Bot |
e13ba5 |
-version-info $(libcrypt_la_VERSION) \
|
|
Packit Bot |
e13ba5 |
-Wl,--version-script=libcrypt.map \
|
|
Packit Bot |
e13ba5 |
-Wl,-z,defs -Wl,-z,text
|
|
Packit Bot |
e13ba5 |
libcrypt_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_LIBCRYPT
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
CONFIG_STATUS_DEPENDENCIES = libcrypt.minver
|
|
Packit Bot |
e13ba5 |
EXTRA_libcrypt_la_DEPENDENCIES = libcrypt.map
|
|
Packit Bot |
e13ba5 |
CLEANFILES = libcrypt.map libcrypt.map.T \
|
|
Packit Bot |
e13ba5 |
crypt-symbol-vers.h crypt-symbol-vers.h.T \
|
|
Packit Bot |
e13ba5 |
crypt-hashes.h crypt-hashes.h.T \
|
|
Packit Bot |
e13ba5 |
crypt.h crypt.h.T
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
libcrypt.map: libcrypt.map.in gen-map.awk Makefile
|
|
Packit Bot |
e13ba5 |
$(AM_V_GEN)LC_ALL=C $(AWK) \
|
|
Packit Bot |
e13ba5 |
-v SYMVER_MIN=$(SYMVER_MIN) \
|
|
Packit Bot |
e13ba5 |
-v SYMVER_FLOOR=$(SYMVER_FLOOR) \
|
|
Packit Bot |
e13ba5 |
-v COMPAT_ABI=$(COMPAT_ABI) \
|
|
Packit Bot |
e13ba5 |
-f $(srcdir)/gen-map.awk $(srcdir)/libcrypt.map.in > libcrypt.map.T
|
|
Packit Bot |
e13ba5 |
$(AM_V_at)mv -f libcrypt.map.T libcrypt.map
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
crypt-symbol-vers.h: libcrypt.map.in gen-vers.awk Makefile
|
|
Packit Bot |
e13ba5 |
$(AM_V_GEN)LC_ALL=C $(AWK) \
|
|
Packit Bot |
e13ba5 |
-v SYMVER_MIN=$(SYMVER_MIN) \
|
|
Packit Bot |
e13ba5 |
-v SYMVER_FLOOR=$(SYMVER_FLOOR) \
|
|
Packit Bot |
e13ba5 |
-v COMPAT_ABI=$(COMPAT_ABI) \
|
|
Packit Bot |
e13ba5 |
-f $(srcdir)/gen-vers.awk \
|
|
Packit Bot |
e13ba5 |
$(srcdir)/libcrypt.map.in > crypt-symbol-vers.h.T
|
|
Packit Bot |
e13ba5 |
$(AM_V_at)mv -f crypt-symbol-vers.h.T crypt-symbol-vers.h
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
crypt.h: crypt-base.h gen-crypt-h.awk config.h
|
|
Packit Bot |
e13ba5 |
$(AM_V_GEN)LC_ALL=C $(AWK) \
|
|
Packit Bot |
e13ba5 |
-f $(srcdir)/gen-crypt-h.awk config.h $(srcdir)/crypt-base.h \
|
|
Packit Bot |
e13ba5 |
> crypt.h.T
|
|
Packit Bot |
e13ba5 |
$(AM_V_at)mv -f crypt.h.T crypt.h
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
|
|
Packit Bot |
e13ba5 |
$(AM_V_GEN)LC_ALL=C $(AWK) -f $(srcdir)/gen-hashes.awk \
|
|
Packit Bot |
e13ba5 |
-v ENABLED_HASHES=$(hashes_enabled) \
|
|
Packit Bot |
e13ba5 |
$(srcdir)/hashes.lst > crypt-hashes.h.T
|
|
Packit Bot |
e13ba5 |
$(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
if ENABLE_COMPAT_SUSE
|
|
Packit Bot |
e13ba5 |
# When we are being binary compatible, also install symbolic links to
|
|
Packit Bot |
e13ba5 |
# mimic SUSE's libowcrypt; any program that uses -lowcrypt in its
|
|
Packit Bot |
e13ba5 |
# build, or already has a NEEDED entry for libowcrypt.so.1, will be
|
|
Packit Bot |
e13ba5 |
# redirected to libcrypt. The OW_CRYPT_1.0 symbol versions are already
|
|
Packit Bot |
e13ba5 |
# present in libcrypt.so.1.
|
|
Packit Bot |
e13ba5 |
#
|
|
Packit Bot |
e13ba5 |
# Caution: this hardwires the expected (so)names of the shared
|
|
Packit Bot |
e13ba5 |
# libraries involved, libcrypt.so.1 and libowcrypt.so.1. (We should
|
|
Packit Bot |
e13ba5 |
# be able to get away with this because in any circumstance where the
|
|
Packit Bot |
e13ba5 |
# soname of libcrypt isn't libcrypt.so.1, ENABLE_OBSOLETE_API should
|
|
Packit Bot |
e13ba5 |
# be automatically turned off, and as best I can tell, SUSE only ever
|
|
Packit Bot |
e13ba5 |
# shipped libowcrypt.so.1.)
|
|
Packit Bot |
e13ba5 |
if ENABLE_OBSOLETE_API
|
|
Packit Bot |
e13ba5 |
if ENABLE_STATIC
|
|
Packit Bot |
e13ba5 |
phony_targets += \
|
|
Packit Bot |
e13ba5 |
install-exec-hook-libstatic uninstall-hook-libstatic
|
|
Packit Bot |
e13ba5 |
install-exec-hook: install-exec-hook-libstatic
|
|
Packit Bot |
e13ba5 |
uninstall_hook_targets += \
|
|
Packit Bot |
e13ba5 |
uninstall-hook-libstatic
|
|
Packit Bot |
e13ba5 |
install-exec-hook-libstatic:
|
|
Packit Bot |
e13ba5 |
cd $(DESTDIR)$(libdir) && \
|
|
Packit Bot |
e13ba5 |
$(LN_S) libcrypt.a libowcrypt.a
|
|
Packit Bot |
e13ba5 |
uninstall-hook-libstatic:
|
|
Packit Bot |
e13ba5 |
-rm -f $(DESTDIR)$(libdir)/libowcrypt.a
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
if ENABLE_SHARED
|
|
Packit Bot |
e13ba5 |
phony_targets += \
|
|
Packit Bot |
e13ba5 |
install-exec-hook-libshared uninstall-hook-libshared
|
|
Packit Bot |
e13ba5 |
install-exec-hook: install-exec-hook-libshared
|
|
Packit Bot |
e13ba5 |
uninstall_hook_targets += \
|
|
Packit Bot |
e13ba5 |
uninstall-hook-libshared
|
|
Packit Bot |
e13ba5 |
install-exec-hook-libshared:
|
|
Packit Bot |
e13ba5 |
cd $(DESTDIR)$(libdir) && \
|
|
Packit Bot |
e13ba5 |
$(LN_S) libcrypt.so libowcrypt.so && \
|
|
Packit Bot |
e13ba5 |
$(LN_S) libcrypt.so.1 libowcrypt.so.1
|
|
Packit Bot |
e13ba5 |
uninstall-hook-libshared:
|
|
Packit Bot |
e13ba5 |
-rm -f $(DESTDIR)$(libdir)/libowcrypt.so \
|
|
Packit Bot |
e13ba5 |
$(DESTDIR)$(libdir)/libowcrypt.so.1
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
check_PROGRAMS = \
|
|
Packit Bot |
e13ba5 |
test-alg-des test-alg-hmac-sha1 test-alg-md4 test-alg-md5 \
|
|
Packit Bot |
e13ba5 |
test-alg-sha1 test-alg-sha256 test-alg-sha512 \
|
|
Packit Bot |
e13ba5 |
test-crypt-bcrypt test-crypt-des \
|
|
Packit Bot |
e13ba5 |
test-crypt-md5 test-crypt-nthash \
|
|
Packit Bot |
e13ba5 |
test-crypt-pbkdf1-sha1 test-crypt-sha256 test-crypt-sha512 \
|
|
Packit Bot |
e13ba5 |
test-crypt-sunmd5 \
|
|
Packit Bot |
e13ba5 |
test-byteorder test-badsalt test-badsetting test-gensalt \
|
|
Packit Bot |
e13ba5 |
test-crypt-badargs test-short-outbuf \
|
|
Packit Bot |
d8ea33 |
test-getrandom-interface test-getrandom-fallbacks \
|
|
Packit Bot |
d8ea33 |
test-special-char-salt
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
if ENABLE_OBSOLETE_API
|
|
Packit Bot |
e13ba5 |
libcrypt_la_SOURCES += crypt-des-obsolete.c
|
|
Packit Bot |
e13ba5 |
check_PROGRAMS += test-des-obsolete test-des-obsolete_r
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
TESTS = $(check_PROGRAMS)
|
|
Packit Bot |
e13ba5 |
if ENABLE_STATIC
|
|
Packit Bot |
e13ba5 |
TESTS += test-symbols-static
|
|
Packit Bot |
e13ba5 |
if HAVE_CPP_dD
|
|
Packit Bot |
e13ba5 |
TESTS += test-symbols-renames
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
if ENABLE_OBSOLETE_API
|
|
Packit Bot |
e13ba5 |
TESTS += test-symbols-compat
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
EXTRA_DIST += test-symbols-static test-symbols-compat test-symbols-renames
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
AM_TESTS_ENVIRONMENT = \
|
|
Packit Bot |
e13ba5 |
lib_la="./libcrypt.la"; lib_map="$(srcdir)/libcrypt.map.in"; \
|
|
Packit Bot |
e13ba5 |
CC="$(CC)"; CPP="$(CPP)"; \
|
|
Packit Bot |
e13ba5 |
CPPFLAGS="$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)"; \
|
|
Packit Bot |
e13ba5 |
CPPFLAGS="$${CPPFLAGS} $(AM_CPPFLAGS) $(CPPFLAGS)"; \
|
|
Packit Bot |
e13ba5 |
export lib_la lib_map CC CPP CPPFLAGS;
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
if CROSS_COMPILING
|
|
Packit Bot |
e13ba5 |
LOG_COMPILER = m4/skip-if-exec-format-error
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
EXTRA_DIST += m4/skip-if-exec-format-error
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
test_crypt_bcrypt_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_des_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_md5_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_nthash_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_pbkdf1_sha1_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_sha256_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_sha512_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_sunmd5_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_badsalt_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_badsetting_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_gensalt_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_des_obsolete_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_des_obsolete_r_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_crypt_badargs_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
test_short_outbuf_LDADD = libcrypt.la
|
|
Packit Bot |
d8ea33 |
test_special_char_salt_LDADD = libcrypt.la
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
# These tests call internal APIs that may not be accessible from the
|
|
Packit Bot |
e13ba5 |
# fully linked shared library.
|
|
Packit Bot |
e13ba5 |
test_alg_des_LDADD = alg-des.lo alg-des-tables.lo
|
|
Packit Bot |
e13ba5 |
test_alg_hmac_sha1_LDADD = alg-sha1.lo alg-hmac-sha1.lo
|
|
Packit Bot |
e13ba5 |
test_alg_md4_LDADD = alg-md4.lo
|
|
Packit Bot |
e13ba5 |
test_alg_md5_LDADD = alg-md5.lo
|
|
Packit Bot |
e13ba5 |
test_alg_sha1_LDADD = alg-sha1.lo
|
|
Packit Bot |
e13ba5 |
test_alg_sha256_LDADD = alg-sha256.lo
|
|
Packit Bot |
e13ba5 |
test_alg_sha512_LDADD = alg-sha512.lo
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
test_getrandom_interface_LDADD = randombytes.lo
|
|
Packit Bot |
e13ba5 |
test_getrandom_fallbacks_LDADD = randombytes.lo
|
|
Packit Bot |
e13ba5 |
if HAVE_LD_WRAP
|
|
Packit Bot |
e13ba5 |
test_getrandom_fallbacks_LDFLAGS = \
|
|
Packit Bot |
e13ba5 |
-Wl,--wrap,getentropy -Wl,--wrap,getrandom -Wl,--wrap,syscall \
|
|
Packit Bot |
e13ba5 |
-Wl,--wrap,open -Wl,--wrap,open64 -Wl,--wrap,read -Wl,--wrap,close
|
|
Packit Bot |
e13ba5 |
endif
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
# Every object file depends on crypt-symbol-vers.h and crypt-hashes.h,
|
|
Packit Bot |
e13ba5 |
# which are generated files, so automatic dependency generation is not
|
|
Packit Bot |
e13ba5 |
# sufficient. Most of the test programs depend on either libcrypt.la
|
|
Packit Bot |
e13ba5 |
# or one of its components, so they do not need an explicit dependency
|
|
Packit Bot |
e13ba5 |
# (after the first *successful* build, automatic dependency generation
|
|
Packit Bot |
e13ba5 |
# will reveal the direct dependency) but a few don't.
|
|
Packit Bot |
e13ba5 |
$(libcrypt_la_OBJECTS): crypt-symbol-vers.h crypt-hashes.h
|
|
Packit Bot |
e13ba5 |
$(test_byteorder_OBJECTS): crypt-symbol-vers.h crypt-hashes.h
|
|
Packit Bot |
e13ba5 |
|
|
Packit Bot |
e13ba5 |
# Add additional targets
|
|
Packit Bot |
e13ba5 |
.PHONY: $(phony_targets)
|
|
Packit Bot |
e13ba5 |
uninstall-hook: $(uninstall_hook_targets)
|