• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include_directories(../../include)
2
3if (${ARCH} STREQUAL "x86_64")
4  set(
5    EC_ARCH_SOURCES
6
7    p256-x86_64-asm.${ASM_EXT}
8  )
9endif()
10
11add_library(
12  ec
13
14  OBJECT
15
16  ec.c
17  ec_asn1.c
18  ec_key.c
19  ec_montgomery.c
20  oct.c
21  p224-64.c
22  p256-64.c
23  p256-x86_64.c
24  simple.c
25  util-64.c
26  wnaf.c
27
28  ${EC_ARCH_SOURCES}
29)
30
31perlasm(p256-x86_64-asm.${ASM_EXT} asm/p256-x86_64-asm.pl)
32
33add_executable(
34  example_mul
35
36  example_mul.c
37
38  $<TARGET_OBJECTS:test_support>
39)
40
41add_executable(
42  ec_test
43
44  ec_test.cc
45
46  $<TARGET_OBJECTS:test_support>
47)
48
49target_link_libraries(example_mul crypto)
50target_link_libraries(ec_test crypto)
51add_dependencies(all_tests example_mul ec_test)
52