• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include_directories(../../include)
2
3if (${ARCH} STREQUAL "x86_64")
4  set(
5    SHA_ARCH_SOURCES
6
7    sha1-x86_64.${ASM_EXT}
8    sha256-x86_64.${ASM_EXT}
9    sha512-x86_64.${ASM_EXT}
10  )
11endif()
12
13if (${ARCH} STREQUAL "x86")
14  set(
15    SHA_ARCH_SOURCES
16
17    sha1-586.${ASM_EXT}
18    sha256-586.${ASM_EXT}
19    sha512-586.${ASM_EXT}
20  )
21endif()
22
23if (${ARCH} STREQUAL "arm")
24  set(
25    SHA_ARCH_SOURCES
26
27    sha1-armv4-large.${ASM_EXT}
28    sha256-armv4.${ASM_EXT}
29    sha512-armv4.${ASM_EXT}
30  )
31endif()
32
33if (${ARCH} STREQUAL "aarch64")
34  set(
35    SHA_ARCH_SOURCES
36
37    sha1-armv8.${ASM_EXT}
38    sha256-armv8.${ASM_EXT}
39    sha512-armv8.${ASM_EXT}
40  )
41endif()
42
43add_library(
44  sha
45
46  OBJECT
47
48  sha1.c
49  sha256.c
50  sha512.c
51
52  ${SHA_ARCH_SOURCES}
53)
54
55perlasm(sha1-x86_64.${ASM_EXT} asm/sha1-x86_64.pl)
56perlasm(sha256-x86_64.${ASM_EXT} asm/sha512-x86_64.pl sha256)
57perlasm(sha512-x86_64.${ASM_EXT} asm/sha512-x86_64.pl sha512)
58perlasm(sha1-586.${ASM_EXT} asm/sha1-586.pl)
59perlasm(sha256-586.${ASM_EXT} asm/sha256-586.pl)
60perlasm(sha512-586.${ASM_EXT} asm/sha512-586.pl)
61perlasm(sha1-armv4-large.${ASM_EXT} asm/sha1-armv4-large.pl)
62perlasm(sha256-armv4.${ASM_EXT} asm/sha256-armv4.pl)
63perlasm(sha512-armv4.${ASM_EXT} asm/sha512-armv4.pl)
64perlasm(sha1-armv8.${ASM_EXT} asm/sha1-armv8.pl)
65perlasm(sha256-armv8.${ASM_EXT} asm/sha512-armv8.pl sha256)
66perlasm(sha512-armv8.${ASM_EXT} asm/sha512-armv8.pl sha512)
67