You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

73 lines
1.3 KiB

  1. include_directories(../../include)
  2. if (${ARCH} STREQUAL "x86_64")
  3. set(
  4. AES_ARCH_SOURCES
  5. aes-x86_64.${ASM_EXT}
  6. aesni-x86_64.${ASM_EXT}
  7. bsaes-x86_64.${ASM_EXT}
  8. vpaes-x86_64.${ASM_EXT}
  9. )
  10. endif()
  11. if (${ARCH} STREQUAL "x86")
  12. set(
  13. AES_ARCH_SOURCES
  14. aes-586.${ASM_EXT}
  15. vpaes-x86.${ASM_EXT}
  16. aesni-x86.${ASM_EXT}
  17. )
  18. endif()
  19. if (${ARCH} STREQUAL "arm")
  20. set(
  21. AES_ARCH_SOURCES
  22. aes-armv4.${ASM_EXT}
  23. bsaes-armv7.${ASM_EXT}
  24. aesv8-armx.${ASM_EXT}
  25. )
  26. endif()
  27. if (${ARCH} STREQUAL "aarch64")
  28. set(
  29. AES_ARCH_SOURCES
  30. aesv8-armx.${ASM_EXT}
  31. )
  32. endif()
  33. add_library(
  34. aes
  35. OBJECT
  36. aes.c
  37. mode_wrappers.c
  38. ${AES_ARCH_SOURCES}
  39. )
  40. perlasm(aes-x86_64.${ASM_EXT} asm/aes-x86_64.pl)
  41. perlasm(aesni-x86_64.${ASM_EXT} asm/aesni-x86_64.pl)
  42. perlasm(bsaes-x86_64.${ASM_EXT} asm/bsaes-x86_64.pl)
  43. perlasm(vpaes-x86_64.${ASM_EXT} asm/vpaes-x86_64.pl)
  44. perlasm(aes-586.${ASM_EXT} asm/aes-586.pl)
  45. perlasm(vpaes-x86.${ASM_EXT} asm/vpaes-x86.pl)
  46. perlasm(aesni-x86.${ASM_EXT} asm/aesni-x86.pl)
  47. perlasm(aes-armv4.${ASM_EXT} asm/aes-armv4.pl)
  48. perlasm(bsaes-armv7.${ASM_EXT} asm/bsaes-armv7.pl)
  49. perlasm(aesv8-armx.${ASM_EXT} asm/aesv8-armx.pl)
  50. add_executable(
  51. aes_test
  52. aes_test.cc
  53. $<TARGET_OBJECTS:test_support>
  54. )
  55. target_link_libraries(aes_test crypto)
  56. add_dependencies(all_tests aes_test)