VirtualBox

source: vbox/trunk/src/libs/openssl-3.4.1/Makefile.kmk

Last change on this file was 109052, checked in by vboxsync, 3 weeks ago

openssl-3.4.1: Applied our changes, regenerated files, added missing files and functions. This time with a three way merge. ​bugref:10890

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 KB
Line 
1# $Id: Makefile.kmk 109052 2025-04-22 13:23:25Z vboxsync $
2## @file
3# Sub-Makefile for the OpenSSL base directory.
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.215389.xyz.
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
28SUB_DEPTH = ../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31# Make sure our Config.kmk is included.
32ifndef VBOX_PATH_CRYPTO
33 include $(PATH_SUB_CURRENT)/Config.kmk
34endif
35
36# Include sub-makefiles.
37include $(PATH_SUB_CURRENT)/providers/Makefile.kmk
38include $(PATH_SUB_CURRENT)/crypto/Makefile.kmk
39include $(PATH_SUB_CURRENT)/ssl/Makefile.kmk
40
41# Let kBuild generate the rules.
42include $(FILE_KBUILD_SUB_FOOTER)
43
44#
45# Re-creates certain openssl headers which exist as templates.
46#
47OSSL_HDR_TEMPLATES := \
48 $(PATH_SUB_CURRENT)/include/openssl/asn1.h.in \
49 $(PATH_SUB_CURRENT)/include/openssl/asn1t.h.in \
50 $(PATH_SUB_CURRENT)/include/openssl/bio.h.in \
51 $(PATH_SUB_CURRENT)/include/openssl/cmp.h.in \
52 $(PATH_SUB_CURRENT)/include/openssl/cms.h.in \
53 $(PATH_SUB_CURRENT)/include/openssl/comp.h.in \
54 $(PATH_SUB_CURRENT)/include/openssl/conf.h.in \
55 $(PATH_SUB_CURRENT)/include/openssl/configuration.h.in \
56 $(PATH_SUB_CURRENT)/include/openssl/core_names.h.in \
57 $(PATH_SUB_CURRENT)/include/openssl/crmf.h.in \
58 $(PATH_SUB_CURRENT)/include/openssl/crypto.h.in \
59 $(PATH_SUB_CURRENT)/include/openssl/ct.h.in \
60 $(PATH_SUB_CURRENT)/include/openssl/err.h.in \
61 $(PATH_SUB_CURRENT)/include/openssl/ess.h.in \
62 $(PATH_SUB_CURRENT)/include/openssl/fipskey.h.in \
63 $(PATH_SUB_CURRENT)/include/openssl/lhash.h.in \
64 $(PATH_SUB_CURRENT)/include/openssl/opensslv.h.in \
65 $(PATH_SUB_CURRENT)/include/openssl/ocsp.h.in \
66 $(PATH_SUB_CURRENT)/include/openssl/pkcs12.h.in \
67 $(PATH_SUB_CURRENT)/include/openssl/pkcs7.h.in \
68 $(PATH_SUB_CURRENT)/include/openssl/safestack.h.in \
69 $(PATH_SUB_CURRENT)/include/openssl/srp.h.in \
70 $(PATH_SUB_CURRENT)/include/openssl/ssl.h.in \
71 $(PATH_SUB_CURRENT)/include/openssl/ui.h.in \
72 $(PATH_SUB_CURRENT)/include/openssl/x509.h.in \
73 $(PATH_SUB_CURRENT)/include/openssl/x509_acert.h.in \
74 $(PATH_SUB_CURRENT)/include/openssl/x509_vfy.h.in \
75 $(PATH_SUB_CURRENT)/include/openssl/x509v3.h.in
76
77#
78# Big fat @todo:
79# I'm too stupid atm to figure out how to get this executed sequentially
80# instead of getting it expanded and executed at once...
81#
82recreate-headers: $(PATH_SUB_CURRENT)/util/dofile.pl \
83 $(OSSL_HDR_TEMPLATES) \
84 recreate-crypto-sources \
85 recreate-internal-headers \
86 recreate-providers-headers
87 $(foreach header, $(OSSL_HDR_TEMPLATES), \
88 perl -I$(PATH_SUB_CURRENT) \
89 -Mconfigdata $(PATH_SUB_CURRENT)/util/dofile.pl -oMakefile \
90 $(header) > $(PATH_SUB_CURRENT)/gen-includes/openssl/$(basename $(notdir $(header)));))
91
92# At the moment there is a single template in include/internal, hence no list nor for loop
93recreate-internal-headers: $(PATH_SUB_CURRENT)/util/dofile.pl
94 perl -I$(PATH_SUB_CURRENT) \
95 -Mconfigdata $(PATH_SUB_CURRENT)/util/dofile.pl -oMakefile \
96 $(PATH_SUB_CURRENT)/include/internal/param_names.h.in > $(PATH_SUB_CURRENT)/gen-includes/internal/param_names.h
97
98#
99# How to regenerate the openssl-mangling.h
100#
101openssl-mangling.h openssl-mangling-new.h: $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) FORCE
102 $(RM) -f -- $@
103 $(APPEND_EXT) -tn $@ \
104 '/* $(DOLLAR)Id: $(DOLLAR) */' \
105 "/** @file" \
106 " * Autogenerate symbol mangling header for openssl." \
107 " */" \
108 "" \
109 "/*" \
110 " * Copyright (C) 2011$(if-expr $(date %Y) > 2011,-$(date %Y),) Oracle and/or its affiliates." \
111 " *" \
112 " * This file is part of VirtualBox base platform packages, as" \
113 " * available from https://www.215389.xyz." \
114 " *" \
115 " * This program is free software; you can redistribute it and/or" \
116 " * modify it under the terms of the GNU General Public License" \
117 " * as published by the Free Software Foundation, in version 3 of the" \
118 " * License." \
119 " *" \
120 " * This program is distributed in the hope that it will be useful, but" \
121 " * WITHOUT ANY WARRANTY; without even the implied warranty of" \
122 " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU" \
123 " * General Public License for more details." \
124 " *" \
125 " * You should have received a copy of the GNU General Public License" \
126 " * along with this program; if not, see <https://www.gnu.org/licenses>." \
127 " *" \
128 " * SPDX-License-Identifier: GPL-3.0-only" \
129 " */" \
130 "" \
131 "#ifndef ___openssl_mangling_h___" \
132 "#define ___openssl_mangling_h___" \
133 "# ifdef VBOX_IN_EXTPACK" \
134 "# define OPENSSL_MANGLER(a_Name) OracleExtPack_ ## a_Name" \
135 "# define OPENSSL_MANGLER_ASM(a_Name) _OracleExtPack_ ## a_Name" \
136 "# else" \
137 "# define OPENSSL_MANGLER(a_Name) VBox_ ## a_Name" \
138 "# define OPENSSL_MANGLER_ASM(a_Name) _VBox_ ## a_Name" \
139 "# endif"
140 nm $(filter-out FORCE, $+) \
141 | $(SED) \
142 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
143 -e '/\.eh$(DOLLAR)/d' \
144 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
145 -e 's/[[:space:]]*//g' \
146 -e 's/^VBox_//' \
147 | sort \
148 | $(SED) -e 's/^\(.*\)$(DOLLAR)/#ifndef OPENSSL_MANGLE_ASM\n# ifndef \1\n# define \1 OPENSSL_MANGLER(\1)\n# endif\n#else\n# ifndef _\1\n# define _\1 OPENSSL_MANGLER_ASM(\1)\n# endif\n#endif/' --append-text $@
149 $(APPEND_EXT) -n $@ \
150 "#endif" \
151 ""
152
153#
154# Lists unmangled symbols.
155#
156.PHONY: check-openssl-mangling
157check-openssl-mangling: \
158 $(VBox-libcrypto_1_TARGET) \
159 $(VBox-libssl_1_TARGET) \
160 $(VBoxExtPack-libcrypto_1_TARGET) \
161 $(VBoxExtPack-libssl_1_TARGET) FORCE
162 nm $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) \
163 | $(SED) \
164 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
165 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
166 -e 's/[[:space:]]*//g' \
167 -e '/^VBox_/d' \
168 | sort
169 nm $(VBoxExtPack-libcrypto_1_TARGET) $(VBoxExtPack-libssl_1_TARGET) \
170 | $(SED) \
171 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
172 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
173 -e 's/[[:space:]]*//g' \
174 -e '/^OracleExtPack_/d' \
175 | sort
Note: See TracBrowser for help on using the repository browser.

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