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.
 
 
 
 
 
 

76 linhas
1.1 KiB

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