2015-08-25 02:03:17 +01:00
|
|
|
include_directories(../../include)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "x86_64")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
SHA_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
sha1-x86_64.${ASM_EXT}
|
|
|
|
sha256-x86_64.${ASM_EXT}
|
|
|
|
sha512-x86_64.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "x86")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
SHA_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
sha1-586.${ASM_EXT}
|
|
|
|
sha256-586.${ASM_EXT}
|
|
|
|
sha512-586.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "arm")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
SHA_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
sha1-armv4-large.${ASM_EXT}
|
|
|
|
sha256-armv4.${ASM_EXT}
|
|
|
|
sha512-armv4.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
2015-01-09 23:44:37 +00:00
|
|
|
if (${ARCH} STREQUAL "aarch64")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
SHA_ARCH_SOURCES
|
2015-01-09 23:44:37 +00:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
sha1-armv8.${ASM_EXT}
|
|
|
|
sha256-armv8.${ASM_EXT}
|
|
|
|
sha512-armv8.${ASM_EXT}
|
|
|
|
)
|
2015-01-09 23:44:37 +00:00
|
|
|
endif()
|
|
|
|
|
2014-06-20 20:00:00 +01:00
|
|
|
add_library(
|
2015-01-29 00:37:10 +00:00
|
|
|
sha
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
OBJECT
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
sha1.c
|
|
|
|
sha256.c
|
|
|
|
sha512.c
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
${SHA_ARCH_SOURCES}
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
perlasm(sha1-x86_64.${ASM_EXT} asm/sha1-x86_64.pl)
|
|
|
|
perlasm(sha256-x86_64.${ASM_EXT} asm/sha512-x86_64.pl sha256)
|
|
|
|
perlasm(sha512-x86_64.${ASM_EXT} asm/sha512-x86_64.pl sha512)
|
|
|
|
perlasm(sha1-586.${ASM_EXT} asm/sha1-586.pl)
|
|
|
|
perlasm(sha256-586.${ASM_EXT} asm/sha256-586.pl)
|
|
|
|
perlasm(sha512-586.${ASM_EXT} asm/sha512-586.pl)
|
|
|
|
perlasm(sha1-armv4-large.${ASM_EXT} asm/sha1-armv4-large.pl)
|
|
|
|
perlasm(sha256-armv4.${ASM_EXT} asm/sha256-armv4.pl)
|
|
|
|
perlasm(sha512-armv4.${ASM_EXT} asm/sha512-armv4.pl)
|
2015-01-09 23:44:37 +00:00
|
|
|
perlasm(sha1-armv8.${ASM_EXT} asm/sha1-armv8.pl)
|
|
|
|
perlasm(sha256-armv8.${ASM_EXT} asm/sha512-armv8.pl sha256)
|
|
|
|
perlasm(sha512-armv8.${ASM_EXT} asm/sha512-armv8.pl sha512)
|