Você não pode selecionar mais de 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.
 
 
 
 
 
 

79 linhas
1.2 KiB

  1. include_directories(../../include)
  2. if (${ARCH} STREQUAL "x86_64")
  3. set(
  4. BN_ARCH_SOURCES
  5. x86_64-mont.${ASM_EXT}
  6. x86_64-mont5.${ASM_EXT}
  7. rsaz-x86_64.${ASM_EXT}
  8. rsaz-avx2.${ASM_EXT}
  9. rsaz_exp.c
  10. )
  11. endif()
  12. if (${ARCH} STREQUAL "x86")
  13. set(
  14. BN_ARCH_SOURCES
  15. bn-586.${ASM_EXT}
  16. co-586.${ASM_EXT}
  17. x86-mont.${ASM_EXT}
  18. )
  19. endif()
  20. if (${ARCH} STREQUAL "arm")
  21. set(
  22. BN_ARCH_SOURCES
  23. armv4-mont.${ASM_EXT}
  24. )
  25. endif()
  26. add_library(
  27. bn
  28. OBJECT
  29. add.c
  30. asm/x86_64-gcc.c
  31. bn.c
  32. bn_asn1.c
  33. cmp.c
  34. convert.c
  35. ctx.c
  36. div.c
  37. exponentiation.c
  38. generic.c
  39. gcd.c
  40. kronecker.c
  41. montgomery.c
  42. mul.c
  43. prime.c
  44. random.c
  45. shift.c
  46. sqrt.c
  47. ${BN_ARCH_SOURCES}
  48. )
  49. perlasm(x86_64-mont.${ASM_EXT} asm/x86_64-mont.pl)
  50. perlasm(x86_64-mont5.${ASM_EXT} asm/x86_64-mont5.pl)
  51. perlasm(rsaz-x86_64.${ASM_EXT} asm/rsaz-x86_64.pl)
  52. perlasm(rsaz-avx2.${ASM_EXT} asm/rsaz-avx2.pl)
  53. perlasm(bn-586.${ASM_EXT} asm/bn-586.pl)
  54. perlasm(co-586.${ASM_EXT} asm/co-586.pl)
  55. perlasm(x86-mont.${ASM_EXT} asm/x86-mont.pl)
  56. perlasm(armv4-mont.${ASM_EXT} asm/armv4-mont.pl)
  57. add_executable(
  58. bn_test
  59. bn_test.cc
  60. $<TARGET_OBJECTS:test_support>
  61. )
  62. target_link_libraries(bn_test crypto)