VirtualBox

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

Last change on this file since 94310 was 94116, checked in by vboxsync, 3 years ago

libs/openssl-3.0.1: Simplify the header/source generation, only one variant is required because the differences between the different hosts and architectures are minimal, bugref:10128

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