2018-07-30 02:07:02 +00:00
|
|
|
include_directories(../../include)
|
2015-09-24 20:52:02 +00:00
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "arm")
|
|
|
|
set(
|
|
|
|
CHACHA_ARCH_SOURCES
|
|
|
|
|
2018-07-30 02:07:02 +00:00
|
|
|
chacha-armv4.${ASM_EXT}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "aarch64")
|
|
|
|
set(
|
|
|
|
CHACHA_ARCH_SOURCES
|
|
|
|
|
|
|
|
chacha-armv8.${ASM_EXT}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "x86")
|
|
|
|
set(
|
|
|
|
CHACHA_ARCH_SOURCES
|
|
|
|
|
|
|
|
chacha-x86.${ASM_EXT}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${ARCH} STREQUAL "x86_64")
|
|
|
|
set(
|
|
|
|
CHACHA_ARCH_SOURCES
|
|
|
|
|
|
|
|
chacha-x86_64.${ASM_EXT}
|
2015-09-24 20:52:02 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(
|
|
|
|
chacha
|
|
|
|
|
|
|
|
OBJECT
|
|
|
|
|
2018-07-30 02:07:02 +00:00
|
|
|
chacha.c
|
2015-09-24 20:52:02 +00:00
|
|
|
|
|
|
|
${CHACHA_ARCH_SOURCES}
|
|
|
|
)
|
2018-07-30 02:07:02 +00:00
|
|
|
|
|
|
|
perlasm(chacha-armv4.${ASM_EXT} asm/chacha-armv4.pl)
|
|
|
|
perlasm(chacha-armv8.${ASM_EXT} asm/chacha-armv8.pl)
|
|
|
|
perlasm(chacha-x86.${ASM_EXT} asm/chacha-x86.pl)
|
|
|
|
perlasm(chacha-x86_64.${ASM_EXT} asm/chacha-x86_64.pl)
|