VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.1/Makefile.kmk@ 94102

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

libs/openssl-3.0.1: Pre-create a bunch of headers which were converted to a template style. They use a perl script for processing we don't want on each build platform (same as the assembly stuff), needs work still, bugref:10128

檔案大小: 5.5 KB
 
1# $Id: Makefile.kmk 125764 2018-10-12 17:09:46Z michael $
2## @file
3# Sub-Makefile for the OpenSSL base directory.
4#
5
6#
7# Copyright (C) 2006-2020 Oracle Corporation
8#
9# Oracle Corporation confidential
10# All rights reserved
11#
12
13SUB_DEPTH = ../../..
14include $(KBUILD_PATH)/subheader.kmk
15
16# Make sure our Config.kmk is included.
17ifndef VBOX_PATH_CRYPTO
18 include $(PATH_SUB_CURRENT)/Config.kmk
19endif
20
21# Include sub-makefiles.
22include $(PATH_SUB_CURRENT)/crypto/Makefile.kmk
23include $(PATH_SUB_CURRENT)/ssl/Makefile.kmk
24
25# Let kBuild generate the rules.
26include $(FILE_KBUILD_SUB_FOOTER)
27
28#
29# Re-creates certain openssl headers which exist as templates.
30#
31OSSL_HDR_TEMPLATES := \
32 $(PATH_SUB_CURRENT)/include/openssl/asn1.h.in \
33 $(PATH_SUB_CURRENT)/include/openssl/asn1t.h.in \
34 $(PATH_SUB_CURRENT)/include/openssl/bio.h.in \
35 $(PATH_SUB_CURRENT)/include/openssl/cmp.h.in \
36 $(PATH_SUB_CURRENT)/include/openssl/cms.h.in \
37 $(PATH_SUB_CURRENT)/include/openssl/conf.h.in \
38 $(PATH_SUB_CURRENT)/include/openssl/configuration.h.in \
39 $(PATH_SUB_CURRENT)/include/openssl/crmf.h.in \
40 $(PATH_SUB_CURRENT)/include/openssl/crypto.h.in \
41 $(PATH_SUB_CURRENT)/include/openssl/ct.h.in \
42 $(PATH_SUB_CURRENT)/include/openssl/err.h.in \
43 $(PATH_SUB_CURRENT)/include/openssl/ess.h.in \
44 $(PATH_SUB_CURRENT)/include/openssl/fipskey.h.in \
45 $(PATH_SUB_CURRENT)/include/openssl/lhash.h.in \
46 $(PATH_SUB_CURRENT)/include/openssl/opensslv.h.in \
47 $(PATH_SUB_CURRENT)/include/openssl/ocsp.h.in \
48 $(PATH_SUB_CURRENT)/include/openssl/pkcs12.h.in \
49 $(PATH_SUB_CURRENT)/include/openssl/pkcs7.h.in \
50 $(PATH_SUB_CURRENT)/include/openssl/safestack.h.in \
51 $(PATH_SUB_CURRENT)/include/openssl/srp.h.in \
52 $(PATH_SUB_CURRENT)/include/openssl/ssl.h.in \
53 $(PATH_SUB_CURRENT)/include/openssl/ui.h.in \
54 $(PATH_SUB_CURRENT)/include/openssl/x509.h.in \
55 $(PATH_SUB_CURRENT)/include/openssl/x509_vfy.h.in \
56 $(PATH_SUB_CURRENT)/include/openssl/x509v3.h.in
57
58#
59# Big fat @todo:
60# I'm too stupid atm to figure out how to get this executed sequentially
61# instead of getting it expanded and executed at once...
62#
63recreate-headers: $(PATH_SUB_CURRENT)/util/dofile.pl \
64 $(OSSL_HDR_TEMPLATES)
65 $(foreach target, linux.amd64, \
66 $(foreach header, $(OSSL_HDR_TEMPLATES), \
67 perl -I$(PATH_SUB_CURRENT)/gen-includes/$(target) \
68 -Mconfigdata $(PATH_SUB_CURRENT)/util/dofile.pl -oMakefile \
69 $(header) > $(PATH_SUB_CURRENT)/gen-includes/$(target)/openssl/$(basename $(notdir $(header)));))
70
71#
72# How to regenerate the openssl-mangling.h
73#
74openssl-mangling.h openssl-mangling-new.h: $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) FORCE
75 $(RM) -f -- $@
76 $(APPEND_EXT) -tn $@ \
77 '/* $(DOLLAR)Id: $(DOLLAR) */' \
78 "/** @file" \
79 " * Autogenerate symbol mangling header for openssl." \
80 " */" \
81 "" \
82 "/*" \
83 " * Copyright (C) 2011$(if-expr $(date %Y) > 2011,-$(date %Y),) Oracle Corporation" \
84 " *" \
85 " * This file is part of VirtualBox Open Source Edition (OSE), as" \
86 " * available from http://www.alldomusa.eu.org. This file is free software;" \
87 " * you can redistribute it and/or modify it under the terms of the GNU" \
88 " * General Public License (GPL) as published by the Free Software" \
89 " * Foundation, in version 2 as it comes in the \"COPYING\" file of the" \
90 " * VirtualBox OSE distribution. VirtualBox OSE is distributed in the" \
91 " * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind." \
92 " *" \
93 " * The contents of this file may alternatively be used under the terms" \
94 " * of the Common Development and Distribution License Version 1.0" \
95 " * (CDDL) only, as it comes in the \"COPYING.CDDL\" file of the" \
96 " * VirtualBox OSE distribution, in which case the provisions of the" \
97 " * CDDL are applicable instead of those of the GPL." \
98 " *" \
99 " * You may elect to license modified versions of this file under the" \
100 " * terms and conditions of either the GPL or the CDDL or both." \
101 " */" \
102 "" \
103 "#ifndef ___openssl_mangling_h___" \
104 "#define ___openssl_mangling_h___" \
105 "# ifdef VBOX_IN_EXTPACK" \
106 "# define OPENSSL_MANGLER(a_Name) OracleExtPack_ ## a_Name" \
107 "# define OPENSSL_MANGLER_ASM(a_Name) _OracleExtPack_ ## a_Name" \
108 "# else" \
109 "# define OPENSSL_MANGLER(a_Name) VBox_ ## a_Name" \
110 "# define OPENSSL_MANGLER_ASM(a_Name) _VBox_ ## a_Name" \
111 "# endif"
112 nm $(filter-out FORCE, $+) \
113 | $(SED) \
114 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
115 -e '/\.eh$(DOLLAR)/d' \
116 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
117 -e 's/[[:space:]]*//g' \
118 -e 's/^VBox_//' \
119 | sort \
120 | $(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 $@
121 $(APPEND_EXT) -n $@ \
122 "#endif" \
123 ""
124
125#
126# Lists unmangled symbols.
127#
128.PHONY: check-openssl-mangling
129check-openssl-mangling: \
130 $(VBox-libcrypto_1_TARGET) \
131 $(VBox-libssl_1_TARGET) \
132 $(VBoxExtPack-libcrypto_1_TARGET) \
133 $(VBoxExtPack-libssl_1_TARGET) FORCE
134 nm $(VBox-libcrypto_1_TARGET) $(VBox-libssl_1_TARGET) \
135 | $(SED) \
136 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
137 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
138 -e 's/[[:space:]]*//g' \
139 -e '/^VBox_/d' \
140 | sort
141 nm $(VBoxExtPack-libcrypto_1_TARGET) $(VBoxExtPack-libssl_1_TARGET) \
142 | $(SED) \
143 -e '/^[[:xdigit:]][[:xdigit:]]* [TSDBC] /!d' \
144 -e 's/^[^ ]* [TSDBC] $(if $(intersects $(KBUILD_TARGET), darwin os2 win),_,)\([[:alpha:]_].*\)/\1/' \
145 -e 's/[[:space:]]*//g' \
146 -e '/^OracleExtPack_/d' \
147 | sort
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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