VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.3/Makefile.kmk@ 96408

最後變更 在這個檔案從96408是 96407,由 vboxsync 提交於 3 年 前

scm copyright and license note update

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 6.2 KB
 
1# $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $
2## @file
3# Sub-Makefile for the OpenSSL base directory.
4#
5
6#
7# Copyright (C) 2006-2022 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.alldomusa.eu.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
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/conf.h.in \
54 $(PATH_SUB_CURRENT)/include/openssl/configuration.h.in \
55 $(PATH_SUB_CURRENT)/include/openssl/crmf.h.in \
56 $(PATH_SUB_CURRENT)/include/openssl/crypto.h.in \
57 $(PATH_SUB_CURRENT)/include/openssl/ct.h.in \
58 $(PATH_SUB_CURRENT)/include/openssl/err.h.in \
59 $(PATH_SUB_CURRENT)/include/openssl/ess.h.in \
60 $(PATH_SUB_CURRENT)/include/openssl/fipskey.h.in \
61 $(PATH_SUB_CURRENT)/include/openssl/lhash.h.in \
62 $(PATH_SUB_CURRENT)/include/openssl/opensslv.h.in \
63 $(PATH_SUB_CURRENT)/include/openssl/ocsp.h.in \
64 $(PATH_SUB_CURRENT)/include/openssl/pkcs12.h.in \
65 $(PATH_SUB_CURRENT)/include/openssl/pkcs7.h.in \
66 $(PATH_SUB_CURRENT)/include/openssl/safestack.h.in \
67 $(PATH_SUB_CURRENT)/include/openssl/srp.h.in \
68 $(PATH_SUB_CURRENT)/include/openssl/ssl.h.in \
69 $(PATH_SUB_CURRENT)/include/openssl/ui.h.in \
70 $(PATH_SUB_CURRENT)/include/openssl/x509.h.in \
71 $(PATH_SUB_CURRENT)/include/openssl/x509_vfy.h.in \
72 $(PATH_SUB_CURRENT)/include/openssl/x509v3.h.in
73
74#
75# Big fat @todo:
76# I'm too stupid atm to figure out how to get this executed sequentially
77# instead of getting it expanded and executed at once...
78#
79recreate-headers: $(PATH_SUB_CURRENT)/util/dofile.pl \
80 $(OSSL_HDR_TEMPLATES) \
81 recreate-providers-headers
82 $(foreach header, $(OSSL_HDR_TEMPLATES), \
83 perl -I$(PATH_SUB_CURRENT) \
84 -Mconfigdata $(PATH_SUB_CURRENT)/util/dofile.pl -oMakefile \
85 $(header) > $(PATH_SUB_CURRENT)/gen-includes/openssl/$(basename $(notdir $(header)));))
86
87#
88# How to regenerate the openssl-mangling.h
89#
90openssl-mangling.h openssl-mangling-new.h: $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) FORCE
91 $(RM) -f -- $@
92 $(APPEND_EXT) -tn $@ \
93 '/* $(DOLLAR)Id: $(DOLLAR) */' \
94 "/** @file" \
95 " * Autogenerate symbol mangling header for openssl." \
96 " */" \
97 "" \
98 "/*" \
99 " * Copyright (C) 2011$(if-expr $(date %Y) > 2011,-$(date %Y),) Oracle Corporation" \
100 " *" \
101 " * This file is part of VirtualBox Open Source Edition (OSE), as" \
102 " * available from http://www.alldomusa.eu.org. This file is free software;" \
103 " * you can redistribute it and/or modify it under the terms of the GNU" \
104 " * General Public License (GPL) as published by the Free Software" \
105 " * Foundation, in version 2 as it comes in the \"COPYING\" file of the" \
106 " * VirtualBox OSE distribution. VirtualBox OSE is distributed in the" \
107 " * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind." \
108 " *" \
109 " * The contents of this file may alternatively be used under the terms" \
110 " * of the Common Development and Distribution License Version 1.0" \
111 " * (CDDL) only, as it comes in the \"COPYING.CDDL\" file of the" \
112 " * VirtualBox OSE distribution, in which case the provisions of the" \
113 " * CDDL are applicable instead of those of the GPL." \
114 " *" \
115 " * You may elect to license modified versions of this file under the" \
116 " * terms and conditions of either the GPL or the CDDL or both." \
117 " */" \
118 "" \
119 "#ifndef ___openssl_mangling_h___" \
120 "#define ___openssl_mangling_h___" \
121 "# ifdef VBOX_IN_EXTPACK" \
122 "# define OPENSSL_MANGLER(a_Name) OracleExtPack_ ## a_Name" \
123 "# define OPENSSL_MANGLER_ASM(a_Name) _OracleExtPack_ ## a_Name" \
124 "# else" \
125 "# define OPENSSL_MANGLER(a_Name) VBox_ ## a_Name" \
126 "# define OPENSSL_MANGLER_ASM(a_Name) _VBox_ ## a_Name" \
127 "# endif"
128 nm $(filter-out FORCE, $+) \
129 | $(SED) \
130 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
131 -e '/\.eh$(DOLLAR)/d' \
132 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
133 -e 's/[[:space:]]*//g' \
134 -e 's/^VBox_//' \
135 | sort \
136 | $(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 $@
137 $(APPEND_EXT) -n $@ \
138 "#endif" \
139 ""
140
141#
142# Lists unmangled symbols.
143#
144.PHONY: check-openssl-mangling
145check-openssl-mangling: \
146 $(VBox-libcrypto_1_TARGET) \
147 $(VBox-libssl_1_TARGET) \
148 $(VBoxExtPack-libcrypto_1_TARGET) \
149 $(VBoxExtPack-libssl_1_TARGET) FORCE
150 nm $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) \
151 | $(SED) \
152 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
153 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
154 -e 's/[[:space:]]*//g' \
155 -e '/^VBox_/d' \
156 | sort
157 nm $(VBoxExtPack-libcrypto_1_TARGET) $(VBoxExtPack-libssl_1_TARGET) \
158 | $(SED) \
159 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
160 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
161 -e 's/[[:space:]]*//g' \
162 -e '/^OracleExtPack_/d' \
163 | sort
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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