1 | # $Id: Makefile.kmk 98103 2023-01-17 14:15:46Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # OpenSSL Sub-Makefile.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2022-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 += providers_der
|
---|
32 | providers_der_TEMPLATE = SUBLIBCRYPTO
|
---|
33 | providers_der_DEFS = OPENSSL_NO_DEPRECATED
|
---|
34 | providers_der_SOURCES = \
|
---|
35 | der_dsa_key.c \
|
---|
36 | der_dsa_sig.c \
|
---|
37 | der_ec_key.c \
|
---|
38 | der_ec_sig.c \
|
---|
39 | der_ecx_key.c \
|
---|
40 | der_rsa_key.c \
|
---|
41 | der_rsa_sig.c \
|
---|
42 | der_sm2_key.c \
|
---|
43 | der_sm2_sig.c \
|
---|
44 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_digests_gen.c \
|
---|
45 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_dsa_gen.c \
|
---|
46 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_ec_gen.c \
|
---|
47 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_ecx_gen.c \
|
---|
48 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_rsa_gen.c \
|
---|
49 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_sm2_gen.c \
|
---|
50 | $(VBOX_PATH_OPENSSL)/gen-sources/der/der_wrap_gen.c
|
---|
51 | $(evalcall VBOX_OPENSSL_X86,providers_der)
|
---|
52 |
|
---|
53 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
54 |
|
---|
55 | #
|
---|
56 | # Re-creates certain openssl headers which exist as templates.
|
---|
57 | #
|
---|
58 | OSSL_PROVIDERS_DER_SRC_TEMPLATES := \
|
---|
59 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_digests_gen.c.in \
|
---|
60 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_dsa_gen.c.in \
|
---|
61 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_ec_gen.c.in \
|
---|
62 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_ecx_gen.c.in \
|
---|
63 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_rsa_gen.c.in \
|
---|
64 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_sm2_gen.c.in \
|
---|
65 | $(VBOX_PATH_CRYPTO_PROVIDERS)/common/der/der_wrap_gen.c.in
|
---|
66 |
|
---|
67 | #
|
---|
68 | # Big fat @todo:
|
---|
69 | # I'm too stupid atm to figure out how to get this executed sequentially
|
---|
70 | # instead of getting it expanded and executed at once...
|
---|
71 | #
|
---|
72 | recreate-providers-der-sources: $(VBOX_PATH_OPENSSL)/util/dofile.pl \
|
---|
73 | $(OSSL_PROVIDERS_DER_SRC_TEMPLATES)
|
---|
74 | $(foreach src, $(OSSL_PROVIDERS_DER_SRC_TEMPLATES), \
|
---|
75 | perl \
|
---|
76 | -I$(VBOX_PATH_OPENSSL) \
|
---|
77 | -I$(VBOX_PATH_OPENSSL)/util/perl \
|
---|
78 | -I$(VBOX_PATH_CRYPTO_PROVIDERS)/common/der \
|
---|
79 | -Mconfigdata -Moids_to_c $(VBOX_PATH_OPENSSL)/util/dofile.pl -oMakefile \
|
---|
80 | $(src) > $(VBOX_PATH_OPENSSL)/gen-sources/der/$(basename $(notdir $(src)));))
|
---|