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.
 
 
 
 
 
 

67 lines
1019 B

  1. include_directories(../../include)
  2. if (${ARCH} STREQUAL "x86_64")
  3. set(
  4. MODES_ARCH_SOURCES
  5. aesni-gcm-x86_64.${ASM_EXT}
  6. ghash-x86_64.${ASM_EXT}
  7. )
  8. endif()
  9. if (${ARCH} STREQUAL "x86")
  10. set(
  11. MODES_ARCH_SOURCES
  12. ghash-x86.${ASM_EXT}
  13. )
  14. endif()
  15. if (${ARCH} STREQUAL "arm")
  16. set(
  17. MODES_ARCH_SOURCES
  18. ghash-armv4.${ASM_EXT}
  19. ghashv8-armx.${ASM_EXT}
  20. )
  21. endif()
  22. if (${ARCH} STREQUAL "aarch64")
  23. set(
  24. MODES_ARCH_SOURCES
  25. ghashv8-armx.${ASM_EXT}
  26. )
  27. endif()
  28. add_library(
  29. modes
  30. OBJECT
  31. cbc.c
  32. ctr.c
  33. ofb.c
  34. cfb.c
  35. gcm.c
  36. ${MODES_ARCH_SOURCES}
  37. )
  38. perlasm(aesni-gcm-x86_64.${ASM_EXT} asm/aesni-gcm-x86_64.pl)
  39. perlasm(ghash-x86_64.${ASM_EXT} asm/ghash-x86_64.pl)
  40. perlasm(ghash-x86.${ASM_EXT} asm/ghash-x86.pl)
  41. perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
  42. perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
  43. add_executable(
  44. gcm_test
  45. gcm_test.c
  46. $<TARGET_OBJECTS:test_support>
  47. )
  48. target_link_libraries(gcm_test crypto)
  49. add_dependencies(all_tests gcm_test)