Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

62 linhas
1.1 KiB

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