2014-06-20 20:00:00 +01:00
|
|
|
include_directories(. .. ../../include)
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "x86_64")
|
2015-01-29 00:37:10 +00:00
|
|
|
set(
|
|
|
|
MODES_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
aesni-gcm-x86_64.${ASM_EXT}
|
|
|
|
ghash-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(
|
|
|
|
MODES_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
ghash-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(
|
|
|
|
MODES_ARCH_SOURCES
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
ghash-armv4.${ASM_EXT}
|
|
|
|
ghashv8-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(
|
|
|
|
MODES_ARCH_SOURCES
|
2015-01-09 23:44:37 +00:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
ghashv8-armx.${ASM_EXT}
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(
|
2015-01-29 00:37:10 +00:00
|
|
|
modes
|
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
|
|
|
cbc.c
|
|
|
|
ctr.c
|
|
|
|
ofb.c
|
|
|
|
cfb.c
|
|
|
|
gcm.c
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
${MODES_ARCH_SOURCES}
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
perlasm(aesni-gcm-x86_64.${ASM_EXT} asm/aesni-gcm-x86_64.pl)
|
|
|
|
perlasm(ghash-x86_64.${ASM_EXT} asm/ghash-x86_64.pl)
|
|
|
|
perlasm(ghash-x86.${ASM_EXT} asm/ghash-x86.pl)
|
|
|
|
perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
|
2015-01-09 23:44:37 +00:00
|
|
|
perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
add_executable(
|
2015-01-29 00:37:10 +00:00
|
|
|
gcm_test
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2015-01-29 00:37:10 +00:00
|
|
|
gcm_test.c
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(gcm_test crypto)
|