1include_directories(../../include) 2 3if (${ARCH} STREQUAL "arm") 4 set( 5 CHACHA_ARCH_SOURCES 6 7 chacha-armv4.${ASM_EXT} 8 ) 9endif() 10 11if (${ARCH} STREQUAL "aarch64") 12 set( 13 CHACHA_ARCH_SOURCES 14 15 chacha-armv8.${ASM_EXT} 16 ) 17endif() 18 19if (${ARCH} STREQUAL "x86") 20 set( 21 CHACHA_ARCH_SOURCES 22 23 chacha-x86.${ASM_EXT} 24 ) 25endif() 26 27if (${ARCH} STREQUAL "x86_64") 28 set( 29 CHACHA_ARCH_SOURCES 30 31 chacha-x86_64.${ASM_EXT} 32 ) 33endif() 34 35add_library( 36 chacha 37 38 OBJECT 39 40 chacha.c 41 42 ${CHACHA_ARCH_SOURCES} 43) 44 45perlasm(chacha-armv4.${ASM_EXT} asm/chacha-armv4.pl) 46perlasm(chacha-armv8.${ASM_EXT} asm/chacha-armv8.pl) 47perlasm(chacha-x86.${ASM_EXT} asm/chacha-x86.pl) 48perlasm(chacha-x86_64.${ASM_EXT} asm/chacha-x86_64.pl) 49