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(
|
|
|
|
AES_ARCH_SOURCES
|
|
|
|
|
|
|
|
aes-x86_64.${ASM_EXT}
|
|
|
|
aesni-x86_64.${ASM_EXT}
|
|
|
|
bsaes-x86_64.${ASM_EXT}
|
|
|
|
vpaes-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(
|
|
|
|
AES_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
aes-586.${ASM_EXT}
|
|
|
|
vpaes-x86.${ASM_EXT}
|
|
|
|
aesni-x86.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "arm")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
AES_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
aes-armv4.${ASM_EXT}
|
|
|
|
bsaes-armv7.${ASM_EXT}
|
|
|
|
aesv8-armx.${ASM_EXT}
|
|
|
|
)
|
2015-01-09 23:44:37 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "aarch64")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
AES_ARCH_SOURCES
|
2015-01-09 23:44:37 +00:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
aesv8-armx.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(
|
2015-01-29 00:37:10 +00:00
|
|
|
aes
|
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
|
|
|
aes.c
|
|
|
|
mode_wrappers.c
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
${AES_ARCH_SOURCES}
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
perlasm(aes-x86_64.${ASM_EXT} asm/aes-x86_64.pl)
|
|
|
|
perlasm(aesni-x86_64.${ASM_EXT} asm/aesni-x86_64.pl)
|
|
|
|
perlasm(bsaes-x86_64.${ASM_EXT} asm/bsaes-x86_64.pl)
|
|
|
|
perlasm(vpaes-x86_64.${ASM_EXT} asm/vpaes-x86_64.pl)
|
|
|
|
perlasm(aes-586.${ASM_EXT} asm/aes-586.pl)
|
|
|
|
perlasm(vpaes-x86.${ASM_EXT} asm/vpaes-x86.pl)
|
|
|
|
perlasm(aesni-x86.${ASM_EXT} asm/aesni-x86.pl)
|
|
|
|
perlasm(aes-armv4.${ASM_EXT} asm/aes-armv4.pl)
|
|
|
|
perlasm(bsaes-armv7.${ASM_EXT} asm/bsaes-armv7.pl)
|
2015-01-09 23:44:37 +00:00
|
|
|
perlasm(aesv8-armx.${ASM_EXT} asm/aesv8-armx.pl)
|
2015-07-01 04:16:49 +01:00
|
|
|
|
|
|
|
add_executable(
|
|
|
|
aes_test
|
|
|
|
|
|
|
|
aes_test.cc
|
|
|
|
$<TARGET_OBJECTS:test_support>
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(aes_test crypto)
|