VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.2/providers/Makefile.kmk@ 95087

Last change on this file since 95087 was 94320, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1# $Id: Makefile.kmk 94320 2022-03-22 10:38:12Z vboxsync $
2## @file
3# Sub-Makefile for OpenSSL providers.
4#
5
6#
7# Copyright (C) 2022 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Include sub-makefiles.
23#
24# Note! For joining the sub libraries into a single lib, we do some trickery to
25# collect the sub-library names here.
26#
27VBOX_LIBRARIES_BEFORE_CRYPTO_PROVIDERS_SUBDIRS := $(LIBRARIES)
28
29include $(VBOX_PATH_CRYPTO_PROVIDERS)/common/Makefile.kmk
30include $(sort $(wildcard $(VBOX_PATH_CRYPTO_PROVIDERS)/implementations/*/Makefile.kmk))
31
32VBOX_CRYPTO_PROVIDERS_SUBLIBS := $(filter-out $(VBOX_LIBRARIES_BEFORE_CRYPTO_PROVIDERS_SUBDIRS), $(LIBRARIES))
33VBOX_CRYPTO_PROVIDERS_SUBLIBS_X86 := $(filter %-x86, $(VBOX_CRYPTO_PROVIDERS_SUBLIBS))
34VBOX_CRYPTO_PROVIDERS_SUBLIBS := $(filter-out %-x86, $(VBOX_CRYPTO_PROVIDERS_SUBLIBS))
35#if defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS)
36# $(eval LIBRARIES = $(VBOX_LIBRARIES_BEFORE_CRYPTO_SUBDIRS) crypto_sha)
37#else
38if "$(SDK_VBOX_OPENSSL_INCS)" != "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)"
39 $(eval LIBRARIES = $(VBOX_LIBRARIES_BEFORE_CRYPTO_SUBDIRS))
40endif
41VBOX_LIBRARIES_BEFORE_CRYPTO_PROVIDERS_SUBDIRS :=
42
43#
44# The main target: libproviders.
45#
46if "$(SDK_VBOX_OPENSSL_INCS)" == "$(SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS)"
47 LIBRARIES += VBox-libproviders
48endif
49VBox-libproviders_TEMPLATE = LIBCRYPTO
50VBox-libproviders_DEFS = OPENSSL_NO_DEPRECATED
51VBox-libproviders_SOURCES = \
52 baseprov.c \
53 defltprov.c \
54 legacyprov.c \
55 nullprov.c \
56 prov_running.c
57 VBox-libproviders_SOURCES += $(foreach sublib,$(VBOX_CRYPTO_PROVIDERS_SUBLIBS), $($(sublib)_1_TARGET))
58
59ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
60 LIBRARIES += VBox-libproviders-x86
61 VBox-libproviders-x86_TEMPLATE = VBoxLibCrypto-x86
62 VBox-libproviders-x86_EXTENDS = VBox-libproviders
63 VBox-libproviders-x86_SOURCES = $(filter %.c %.cpp,$(VBox-libproviders_SOURCES)) \
64 $(foreach sublib,$(VBOX_CRYPTO_PROVIDERS_SUBLIBS_X86), $($(sublib)_1_TARGET))
65endif
66
67
68ifdef VBOX_NEED_EXTPACK_OPENSSL
69 #
70 # For the extension pack.
71 #
72 LIBRARIES += VBoxExtPack-libproviders
73 VBoxExtPack-libproviders_EXTENDS = VBox-libproviders
74 VBoxExtPack-libproviders_DEFS = VBOX_IN_EXTPACK
75endif
76
77include $(FILE_KBUILD_SUB_FOOTER)
78
79#
80# Re-creates certain openssl headers which exist as templates.
81#
82OSSL_PROVIDERS_HDR_TEMPLATES := \
83 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_digests.h.in \
84 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_dsa.h.in \
85 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_ec.h.in \
86 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_ecx.h.in \
87 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_rsa.h.in \
88 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_sm2.h.in \
89 $(VBOX_PATH_CRYPTO_PROVIDERS)/common/include/prov/der_wrap.h.in
90
91#
92# Big fat @todo:
93# I'm too stupid atm to figure out how to get this executed sequentially
94# instead of getting it expanded and executed at once...
95#
96recreate-providers-headers: $(VBOX_PATH_OPENSSL)/util/dofile.pl \
97 $(OSSL_PROVIDERS_HDR_TEMPLATES) \
98 recreate-providers-der-sources
99 $(foreach header, $(OSSL_PROVIDERS_HDR_TEMPLATES), \
100 perl \
101 -I$(VBOX_PATH_OPENSSL) \
102 -I$(VBOX_PATH_OPENSSL)/util/perl \
103 -I$(VBOX_PATH_CRYPTO_PROVIDERS)/common/der \
104 -Mconfigdata -Moids_to_c $(VBOX_PATH_OPENSSL)/util/dofile.pl -oMakefile \
105 $(header) > $(VBOX_PATH_OPENSSL)/gen-includes/prov/$(basename $(notdir $(header)));))
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette