1 | # $Id: Makefile.kmk 99366 2023-04-10 17:34:54Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # OpenSSL Sub-Makefile.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-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_aes
|
---|
32 | crypto_aes_TEMPLATE = SubLibCrypto
|
---|
33 | crypto_aes_DEFS = OPENSSL_NO_DEPRECATED
|
---|
34 | crypto_aes_SOURCES = \
|
---|
35 | aes_cfb.c \
|
---|
36 | aes_ecb.c \
|
---|
37 | aes_ige.c \
|
---|
38 | aes_misc.c \
|
---|
39 | aes_ofb.c \
|
---|
40 | aes_wrap.c
|
---|
41 | ifdef VBOX_WITH_CRYPTO_ASM
|
---|
42 | crypto_aes_SOURCES.x86 += \
|
---|
43 | $(VBOX_PATH_CRYPTO_GENASM)/aes-586.S \
|
---|
44 | $(VBOX_PATH_CRYPTO_GENASM)/vpaes-x86.S \
|
---|
45 | $(VBOX_PATH_CRYPTO_GENASM)/aesni-x86.S
|
---|
46 | crypto_aes_SOURCES.amd64 += \
|
---|
47 | $(VBOX_PATH_CRYPTO_GENASM)/aes-x86_64.S \
|
---|
48 | $(VBOX_PATH_CRYPTO_GENASM)/vpaes-x86_64.S \
|
---|
49 | $(VBOX_PATH_CRYPTO_GENASM)/bsaes-x86_64.S \
|
---|
50 | $(VBOX_PATH_CRYPTO_GENASM)/aesni-x86_64.S \
|
---|
51 | $(VBOX_PATH_CRYPTO_GENASM)/aesni-mb-x86_64.S \
|
---|
52 | $(VBOX_PATH_CRYPTO_GENASM)/aesni-sha1-x86_64.S \
|
---|
53 | $(VBOX_PATH_CRYPTO_GENASM)/aesni-sha256-x86_64.S
|
---|
54 | else
|
---|
55 | crypto_aes_SOURCES += \
|
---|
56 | aes_core.c \
|
---|
57 | aes_cbc.c
|
---|
58 | endif
|
---|
59 |
|
---|
60 | $(evalcall VBOX_OPENSSL_X86,crypto_aes)
|
---|
61 |
|
---|
62 |
|
---|
63 | recreate-aes-asm: $(VBOX_PATH_CRYPTO)/perlasm/x86asm.pl \
|
---|
64 | $(VBOX_PATH_CRYPTO_AES)/asm/aes-586.pl \
|
---|
65 | $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86.pl \
|
---|
66 | $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86.pl \
|
---|
67 | $(VBOX_PATH_CRYPTO_AES)/asm/aes-x86_64.pl \
|
---|
68 | $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86_64.pl \
|
---|
69 | $(VBOX_PATH_CRYPTO_AES)/asm/bsaes-x86_64.pl \
|
---|
70 | $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86_64.pl \
|
---|
71 | $(VBOX_PATH_CRYPTO_AES)/asm/aesni-mb-x86_64.pl \
|
---|
72 | $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha1-x86_64.pl \
|
---|
73 | $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha256-x86_64.pl
|
---|
74 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-586.pl elf -fPIC $(VBOX_PATH_CRYPTO)/genasm-elf/aes-586.S
|
---|
75 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86.pl elf -fPIC $(VBOX_PATH_CRYPTO)/genasm-elf/vpaes-x86.S
|
---|
76 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86.pl elf -fPIC $(VBOX_PATH_CRYPTO)/genasm-elf/aesni-x86.S
|
---|
77 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/aes-x86_64.S
|
---|
78 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/vpaes-x86_64.S
|
---|
79 | perl $(VBOX_PATH_CRYPTO_AES)/asm/bsaes-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/bsaes-x86_64.S
|
---|
80 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/aesni-x86_64.S
|
---|
81 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-mb-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/aesni-mb-x86_64.S
|
---|
82 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha1-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/aesni-sha1-x86_64.S
|
---|
83 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha256-x86_64.pl elf $(VBOX_PATH_CRYPTO)/genasm-elf/aesni-sha256-x86_64.S
|
---|
84 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-586.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aes-586.S
|
---|
85 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/vpaes-x86.S
|
---|
86 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aesni-x86.S
|
---|
87 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aes-x86_64.S
|
---|
88 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/vpaes-x86_64.S
|
---|
89 | perl $(VBOX_PATH_CRYPTO_AES)/asm/bsaes-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/bsaes-x86_64.S
|
---|
90 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aesni-x86_64.S
|
---|
91 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-mb-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aesni-mb-x86_64.S
|
---|
92 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha1-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aesni-sha1-x86_64.S
|
---|
93 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha256-x86_64.pl macosx $(VBOX_PATH_CRYPTO)/genasm-macosx/aesni-sha256-x86_64.S
|
---|
94 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-586.pl win32n $(VBOX_PATH_CRYPTO)/genasm-nasm/aes-586.S
|
---|
95 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86.pl win32n $(VBOX_PATH_CRYPTO)/genasm-nasm/vpaes-x86.S
|
---|
96 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86.pl win32n $(VBOX_PATH_CRYPTO)/genasm-nasm/aesni-x86.S
|
---|
97 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aes-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/aes-x86_64.S
|
---|
98 | perl $(VBOX_PATH_CRYPTO_AES)/asm/vpaes-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/vpaes-x86_64.S
|
---|
99 | perl $(VBOX_PATH_CRYPTO_AES)/asm/bsaes-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/bsaes-x86_64.S
|
---|
100 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/aesni-x86_64.S
|
---|
101 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-mb-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/aesni-mb-x86_64.S
|
---|
102 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha1-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/aesni-sha1-x86_64.S
|
---|
103 | perl $(VBOX_PATH_CRYPTO_AES)/asm/aesni-sha256-x86_64.pl nasm $(VBOX_PATH_CRYPTO)/genasm-nasm/aesni-sha256-x86_64.S
|
---|
104 |
|
---|
105 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|