summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2012-12-21 17:26:06 +0100
committerWerner Koch <wk@gnupg.org>2012-12-21 17:26:06 +0100
commit09ac5d87d11aa0b1fa0e0a4184ab03b3671a73e2 (patch)
treefdd126ae4b5c2fa2624edac0052619a70c207c1e /src/Makefile.am
parentd842eea55e22c05da3959a7a4422b5fcd7884f60 (diff)
downloadlibgcrypt-09ac5d87d11aa0b1fa0e0a4184ab03b3671a73e2.tar.gz
Prepare for hardware feature detection on other platforms.
* configure.ac (GCRYPT_HWF_MODULES): New. (HAVE_CPU_ARCH_X86, HAVE_CPU_ARCH_ALPHA, HAVE_CPU_ARCH_SPARC) (HAVE_CPU_ARCH_MIPS, HAVE_CPU_ARCH_M68K, HAVE_CPU_ARCH_PPC) (HAVE_CPU_ARCH_ARM): New AC_DEFINEs. * mpi/config.links (mpi_cpu_arch): New. * src/global.c (print_config): Print new tag "cpu-arch". * src/Makefile.am (libgcrypt_la_SOURCES): Add hwf-common.h (EXTRA_libgcrypt_la_SOURCES): New. (gcrypt_hwf_modules): New. (libgcrypt_la_DEPENDENCIES, libgcrypt_la_LIBADD): Add that one. * src/hwfeatures.c: Factor most code out to ... * src/hwf-x86.c: New file. (detect_x86_gnuc): Return the feature vector. (_gcry_hwf_detect_x86): New. * src/hwf-common.h: New. * src/hwfeatures.c (_gcry_detect_hw_features): Dispatch using HAVE_CPU_ARCH_ macros. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2a070677..cdfe0c6d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,12 +54,16 @@ endif
libgcrypt_la_CFLAGS = $(GPG_ERROR_CFLAGS)
libgcrypt_la_SOURCES = g10lib.h visibility.c visibility.h types.h \
cipher.h cipher-proto.h gcrypt-module.h \
- misc.c global.c sexp.c hwfeatures.c \
+ misc.c global.c sexp.c hwfeatures.c hwf-common.h \
stdmem.c stdmem.h secmem.c secmem.h \
mpi.h missing-string.c module.c fips.c \
hmac256.c hmac256.h \
ath.h ath.c
+EXTRA_libgcrypt_la_SOURCES = hwf-x86.c
+gcrypt_hwf_modules = @GCRYPT_HWF_MODULES@
+
+
if HAVE_W32_SYSTEM
RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@@ -101,12 +105,14 @@ libgcrypt_la_LDFLAGS = $(no_undefined) $(export_symbols) \
$(libgcrypt_version_script_cmd) -version-info \
@LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@
libgcrypt_la_DEPENDENCIES = \
+ $(gcrypt_hwf_modules)
../cipher/libcipher.la \
../random/librandom.la \
../mpi/libmpi.la \
../compat/libcompat.la \
$(srcdir)/libgcrypt.vers $(gcrypt_deps)
libgcrypt_la_LIBADD = $(gcrypt_res) \
+ $(gcrypt_hwf_modules) \
../cipher/libcipher.la \
../random/librandom.la \
../mpi/libmpi.la \