1 | # $Id: Makefile.kmk 101021 2023-09-05 15:56:12Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # OpenSSL Sub-Makefile.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2019-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | LIBRARIES += crypto_ec
|
---|
32 | crypto_ec_TEMPLATE = SubLibCrypto
|
---|
33 | crypto_ec_DEFS = OPENSSL_NO_DEPRECATED
|
---|
34 | crypto_ec_SOURCES = \
|
---|
35 | curve25519.c \
|
---|
36 | curve448/arch_32/f_impl32.c \
|
---|
37 | curve448/arch_64/f_impl64.c \
|
---|
38 | curve448/curve448.c \
|
---|
39 | curve448/curve448_tables.c \
|
---|
40 | curve448/eddsa.c \
|
---|
41 | curve448/f_generic.c \
|
---|
42 | curve448/scalar.c \
|
---|
43 | ec2_oct.c \
|
---|
44 | ec2_smpl.c \
|
---|
45 | ec_ameth.c \
|
---|
46 | ec_asn1.c \
|
---|
47 | ec_backend.c \
|
---|
48 | ec_check.c \
|
---|
49 | ec_curve.c \
|
---|
50 | ec_cvt.c \
|
---|
51 | ec_deprecated.c \
|
---|
52 | ec_err.c \
|
---|
53 | ec_key.c \
|
---|
54 | ec_kmeth.c \
|
---|
55 | ec_lib.c \
|
---|
56 | ec_mult.c \
|
---|
57 | ec_oct.c \
|
---|
58 | ec_pmeth.c \
|
---|
59 | ec_print.c \
|
---|
60 | ecdh_kdf.c \
|
---|
61 | ecdh_ossl.c \
|
---|
62 | ecdsa_ossl.c \
|
---|
63 | ecdsa_sign.c \
|
---|
64 | ecdsa_vrf.c \
|
---|
65 | eck_prn.c \
|
---|
66 | ecp_mont.c \
|
---|
67 | ecp_nist.c \
|
---|
68 | ecp_nistz256.c \
|
---|
69 | ecp_oct.c \
|
---|
70 | ecp_smpl.c \
|
---|
71 | ecx_backend.c \
|
---|
72 | ecx_key.c \
|
---|
73 | ecx_meth.c
|
---|
74 |
|
---|
75 | ifdef VBOX_WITH_CRYPTO_ASM
|
---|
76 | crypto_ec_SOURCES.x86 += \
|
---|
77 | $(VBOX_PATH_CRYPTO_GENASM)/ecp_nistz256-x86.S
|
---|
78 | crypto_ec_SOURCES.amd64 += \
|
---|
79 | $(VBOX_PATH_CRYPTO_GENASM)/ecp_nistz256-x86_64.S \
|
---|
80 | $(VBOX_PATH_CRYPTO_GENASM)/x25519-x86_64.S
|
---|
81 | endif
|
---|
82 | $(evalcall VBOX_OPENSSL_X86,crypto_ec)
|
---|
83 |
|
---|
84 |
|
---|
85 | recreate-ec-asm: $(VBOX_PATH_CRYPTO)/perlasm/x86asm.pl \
|
---|
86 | $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86.pl \
|
---|
87 | $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86_64.pl \
|
---|
88 | $(VBOX_PATH_CRYPTO_EC)/asm/x25519-x86_64.pl
|
---|
89 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86.pl elf -fPIC $(VBOX_PATH_CRYPTO)/genasm-elf/ecp_nistz256-x86.S
|
---|
90 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/ecp_nistz256-x86_64.S
|
---|
91 | perl $(VBOX_PATH_CRYPTO_EC)/asm/x25519-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/x25519-x86_64.S
|
---|
92 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/ecp_nistz256-x86.S
|
---|
93 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/ecp_nistz256-x86_64.S
|
---|
94 | perl $(VBOX_PATH_CRYPTO_EC)/asm/x25519-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/x25519-x86_64.S
|
---|
95 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86.pl win32n $(VBOX_PATH_CRYPTO)/genasm-nasm/ecp_nistz256-x86.S
|
---|
96 | perl $(VBOX_PATH_CRYPTO_EC)/asm/ecp_nistz256-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/ecp_nistz256-x86_64.S
|
---|
97 | perl $(VBOX_PATH_CRYPTO_EC)/asm/x25519-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/x25519-x86_64.S
|
---|
98 |
|
---|
99 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|