diff options
author | Adam Langley <agl@chromium.org> | 2014-06-20 23:00:00 +0400 |
---|---|---|
committer | Adam Langley <agl@chromium.org> | 2014-06-21 00:17:32 +0400 |
commit | 95c29f3cd1f6c08c6c0927868683392eea727ccb (patch) | |
tree | 012767320ced9abca61472a4daa4c4a56b7ebe2b /crypto/bn/CMakeLists.txt |
Inital import.
Initial fork from f2d678e6e89b6508147086610e985d4e8416e867 (1.0.2 beta).
(This change contains substantial changes from the original and
effectively starts a new history.)
Diffstat (limited to 'crypto/bn/CMakeLists.txt')
-rw-r--r-- | crypto/bn/CMakeLists.txt | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/crypto/bn/CMakeLists.txt b/crypto/bn/CMakeLists.txt new file mode 100644 index 00000000..5d2dfccb --- /dev/null +++ b/crypto/bn/CMakeLists.txt @@ -0,0 +1,81 @@ +include_directories(. .. ../../include) + +if (${ARCH} STREQUAL "x86_64") + set( + BN_ARCH_SOURCES + + asm/x86_64-gcc.c + x86_64-mont.${ASM_EXT} + x86_64-mont5.${ASM_EXT} + modexp512-x86_64.${ASM_EXT} + rsaz-x86_64.${ASM_EXT} + rsaz-avx2.${ASM_EXT} + + rsaz_exp.c + ) +endif() + +if (${ARCH} STREQUAL "x86") + set( + BN_ARCH_SOURCES + + bn-586.${ASM_EXT} + co-586.${ASM_EXT} + x86-mont.${ASM_EXT} + x86.${ASM_EXT} + ) +endif() + +if (${ARCH} STREQUAL "arm") + set( + BN_ARCH_SOURCES + + armv4-mont.${ASM_EXT} + ) +endif() + +add_library( + bn + + OBJECT + + bn_error.c + add.c + bn.c + cmp.c + convert.c + ctx.c + div.c + exponentiation.c + generic.c + gcd.c + kronecker.c + montgomery.c + mul.c + prime.c + random.c + shift.c + sqrt.c + + ${BN_ARCH_SOURCES} +) + +perlasm(x86_64-mont.${ASM_EXT} asm/x86_64-mont.pl) +perlasm(x86_64-mont5.${ASM_EXT} asm/x86_64-mont5.pl) +perlasm(x86_64-gf2m.${ASM_EXT} asm/x86_64-gf2m.pl) +perlasm(modexp512-x86_64.${ASM_EXT} asm/modexp512-x86_64.pl) +perlasm(rsaz-x86_64.${ASM_EXT} asm/rsaz-x86_64.pl) +perlasm(rsaz-avx2.${ASM_EXT} asm/rsaz-avx2.pl) +perlasm(bn-586.${ASM_EXT} asm/bn-586.pl) +perlasm(co-586.${ASM_EXT} asm/co-586.pl) +perlasm(x86-mont.${ASM_EXT} asm/x86-mont.pl) +perlasm(x86.${ASM_EXT} asm/x86.pl) +perlasm(armv4-mont.${ASM_EXT} asm/armv4-mont.pl) + +add_executable( + bn_test + + bn_test.c +) + +target_link_libraries(bn_test crypto) |