# $Id: Config.kmk 102863 2024-01-13 17:15:52Z vboxsync $ ## @file # OpenSSL kBuild Configuration file. # # # Copyright (C) 2006-2023 Oracle and/or its affiliates. # # This file is part of VirtualBox base platform packages, as # available from https://www.virtualbox.org. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, in version 3 of the # License. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # SPDX-License-Identifier: GPL-3.0-only # # Include the top-level configure file. ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED include $(PATH_ROOT)/Config.kmk endif # Figure out openssl perl asm style for the target VBOX_CRYPTO_ASM_SCHEME := portme if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris) VBOX_CRYPTO_ASM_SCHEME := elf else ifeq ($(KBUILD_TARGET),darwin) VBOX_CRYPTO_ASM_SCHEME := macosx else ifeq ($(KBUILD_TARGET),win) VBOX_CRYPTO_ASM_SCHEME := nasm endif # Can't use relative paths when dealing with sub-makefiles. VBOX_PATH_OPENSSL := $(PATH_ROOT)/src/libs/openssl-3.1.3 VBOX_PATH_CRYPTO := $(VBOX_PATH_OPENSSL)/crypto VBOX_PATH_CRYPTO_GENASM := $(VBOX_PATH_CRYPTO)/genasm-$(VBOX_CRYPTO_ASM_SCHEME) VBOX_PATH_CRYPTO_AES := $(VBOX_PATH_CRYPTO)/aes VBOX_PATH_CRYPTO_BN := $(VBOX_PATH_CRYPTO)/bn VBOX_PATH_CRYPTO_CHACHA := $(VBOX_PATH_CRYPTO)/chacha VBOX_PATH_CRYPTO_EC := $(VBOX_PATH_CRYPTO)/ec VBOX_PATH_CRYPTO_MD5 := $(VBOX_PATH_CRYPTO)/md5 VBOX_PATH_CRYPTO_MODES := $(VBOX_PATH_CRYPTO)/modes VBOX_PATH_CRYPTO_POLY1305 := $(VBOX_PATH_CRYPTO)/poly1305 VBOX_PATH_CRYPTO_RC4 := $(VBOX_PATH_CRYPTO)/rc4 VBOX_PATH_CRYPTO_SHA := $(VBOX_PATH_CRYPTO)/sha VBOX_PATH_CRYPTO_DES := $(VBOX_PATH_CRYPTO)/des VBOX_PATH_CRYPTO_CAMELLIA := $(VBOX_PATH_CRYPTO)/camellia VBOX_INST_CRYPTO_HEADERS := obj/$(if-expr "$(CURSUBDIR)" == ".",,$(CURSUBDIR)/)crypto-3.1.3-headers/include/openssl/ VBOX_PATH_CRYPTO_HEADERS := $(abspath $(PATH_OUT))/$(patsubst %/,%,$(VBOX_INST_CRYPTO_HEADERS)) VBOX_PATH_CRYPTO_PROVIDERS := $(VBOX_PATH_OPENSSL)/providers # Enable asm implementation of crypto. if1of ($(KBUILD_TARGET_ARCH), x86 amd64) ifneq ($(VBOX_CRYPTO_ASM_SCHEME),portme) ifn1of ($(KBUILD_TARGET), ) # Selective exclusion for testing. scm:ignore-empty-if1of-set VBOX_WITH_CRYPTO_ASM = 1 endif endif endif # # A target for installer the header files into a include directory # for the build. We have to put this in the Config.kmk because it # is required when running make from a sub directory too. # INSTALLS += crypto-headers crypto-headers_TEMPLATE := DUMMY crypto-headers_INST = $(VBOX_INST_CRYPTO_HEADERS) crypto-headers_MODE := a+r,u+w crypto-headers_DEFPATH = $(VBOX_PATH_OPENSSL) crypto-headers_SOURCES := \ include/openssl/aes.h=>aes.h \ include/openssl/asn1err.h=>asn1err.h \ include/openssl/asn1_mac.h=>asn1_mac.h \ include/openssl/async.h=>async.h \ include/openssl/asyncerr.h=>asyncerr.h \ include/openssl/bioerr.h=>bioerr.h \ include/openssl/blowfish.h=>blowfish.h \ include/openssl/bn.h=>bn.h \ include/openssl/bnerr.h=>bnerr.h \ include/openssl/buffer.h=>buffer.h \ include/openssl/buffererr.h=>buffererr.h \ include/openssl/camellia.h=>camellia.h \ include/openssl/cast.h=>cast.h \ include/openssl/cmac.h=>cmac.h \ include/openssl/cmp_util.h=>cmp_util.h \ include/openssl/cmperr.h=>cmperr.h \ include/openssl/cmserr.h=>cmserr.h \ include/openssl/comp.h=>comp.h \ include/openssl/comperr.h=>comperr.h \ include/openssl/conferr.h=>conferr.h \ include/openssl/conf_api.h=>conf_api.h \ include/openssl/conftypes.h=>conftypes.h \ include/openssl/core.h=>core.h \ include/openssl/core_dispatch.h=>core_dispatch.h \ include/openssl/core_names.h=>core_names.h \ include/openssl/core_object.h=>core_object.h \ include/openssl/crmferr.h=>crmferr.h \ include/openssl/cryptoerr.h=>cryptoerr.h \ include/openssl/cryptoerr_legacy.h=>cryptoerr_legacy.h \ include/openssl/cterr.h=>cterr.h \ include/openssl/decoder.h=>decoder.h \ include/openssl/decodererr.h=>decodererr.h \ include/openssl/des.h=>des.h \ include/openssl/dh.h=>dh.h \ include/openssl/dherr.h=>dherr.h \ include/openssl/dsa.h=>dsa.h \ include/openssl/dsaerr.h=>dsaerr.h \ include/openssl/dtls1.h=>dtls1.h \ include/openssl/ebcdic.h=>ebcdic.h \ include/openssl/ec.h=>ec.h \ include/openssl/ecerr.h=>ecerr.h \ include/openssl/ecdh.h=>ecdh.h \ include/openssl/ecdsa.h=>ecdsa.h \ include/openssl/encoder.h=>encoder.h \ include/openssl/encodererr.h=>encodererr.h \ include/openssl/engine.h=>engine.h \ include/openssl/engineerr.h=>engineerr.h \ include/openssl/esserr.h=>esserr.h \ include/openssl/evp.h=>evp.h \ include/openssl/evperr.h=>evperr.h \ include/openssl/e_os2.h=>e_os2.h \ include/openssl/fips_names.h=>fips_names.h \ include/openssl/hmac.h=>hmac.h \ include/openssl/http.h=>http.h \ include/openssl/httperr.h=>httperr.h \ include/openssl/idea.h=>idea.h \ include/openssl/kdf.h=>kdf.h \ include/openssl/kdferr.h=>kdferr.h \ include/openssl/macros.h=>macros.h \ include/openssl/md2.h=>md2.h \ include/openssl/md4.h=>md4.h \ include/openssl/md5.h=>md5.h \ include/openssl/mdc2.h=>mdc2.h \ include/openssl/modes.h=>modes.h \ include/openssl/objects.h=>objects.h \ include/openssl/objectserr.h=>objectserr.h \ include/openssl/obj_mac.h=>obj_mac.h \ include/openssl/ocsperr.h=>ocsperr.h \ include/openssl/opensslconf.h=>opensslconf.h \ include/openssl/ossl_typ.h=>ossl_typ.h \ include/openssl/params.h=>params.h \ include/openssl/param_build.h=>param_build.h \ include/openssl/pem.h=>pem.h \ include/openssl/pemerr.h=>pemerr.h \ include/openssl/pem2.h=>pem2.h \ include/openssl/pkcs12err.h=>pkcs12err.h \ include/openssl/pkcs7err.h=>pkcs7err.h \ include/openssl/prov_ssl.h=>prov_ssl.h \ include/openssl/proverr.h=>proverr.h \ include/openssl/provider.h=>provider.h \ include/openssl/rand.h=>rand.h \ include/openssl/randerr.h=>randerr.h \ include/openssl/rc2.h=>rc2.h \ include/openssl/rc4.h=>rc4.h \ include/openssl/rc5.h=>rc5.h \ include/openssl/ripemd.h=>ripemd.h \ include/openssl/rsa.h=>rsa.h \ include/openssl/rsaerr.h=>rsaerr.h \ include/openssl/self_test.h=>self_test.h \ include/openssl/seed.h=>seed.h \ include/openssl/sha.h=>sha.h \ include/openssl/srtp.h=>srtp.h \ include/openssl/sslerr.h=>sslerr.h \ include/openssl/sslerr_legacy.h=>sslerr_legacy.h \ include/openssl/ssl2.h=>ssl2.h \ include/openssl/ssl3.h=>ssl3.h \ include/openssl/stack.h=>stack.h \ include/openssl/store.h=>store.h \ include/openssl/storeerr.h=>storeerr.h \ include/openssl/symhacks.h=>symhacks.h \ include/openssl/tls1.h=>tls1.h \ include/openssl/trace.h=>trace.h \ include/openssl/ts.h=>ts.h \ include/openssl/tserr.h=>tserr.h \ include/openssl/txt_db.h=>txt_db.h \ include/openssl/types.h=>types.h \ include/openssl/uierr.h=>uierr.h \ include/openssl/whrlpool.h=>whrlpool.h \ include/openssl/x509err.h=>x509err.h \ include/openssl/x509v3err.h=>x509v3err.h \ \ openssl-mangling.h=>openssl-mangling.h \ \ gen-includes/openssl/asn1.h=>asn1.h \ gen-includes/openssl/asn1t.h=>asn1t.h \ gen-includes/openssl/bio.h=>bio.h \ gen-includes/openssl/cmp.h=>cmp.h \ gen-includes/openssl/cms.h=>cms.h \ gen-includes/openssl/conf.h=>conf.h \ gen-includes/openssl/configuration.h=>configuration.h \ gen-includes/openssl/crmf.h=>crmf.h \ gen-includes/openssl/crypto.h=>crypto.h \ gen-includes/openssl/ct.h=>ct.h \ gen-includes/openssl/err.h=>err.h \ gen-includes/openssl/ess.h=>ess.h \ gen-includes/openssl/fipskey.h=>fipskey.h \ gen-includes/openssl/lhash.h=>lhash.h \ gen-includes/openssl/ocsp.h=>ocsp.h \ gen-includes/openssl/opensslv.h=>opensslv.h \ gen-includes/openssl/pkcs12.h=>pkcs12.h \ gen-includes/openssl/pkcs7.h=>pkcs7.h \ gen-includes/openssl/safestack.h=>safestack.h \ gen-includes/openssl/srp.h=>srp.h \ gen-includes/openssl/ssl.h=>ssl.h \ gen-includes/openssl/ui.h=>ui.h \ gen-includes/openssl/x509.h=>x509.h \ gen-includes/openssl/x509_vfy.h=>x509_vfy.h \ gen-includes/openssl/x509v3.h=>x509v3.h ## Workaround for GCC 3.3.x or older always warning about '\#pragma once' being obsolete. # # We edit the headers during installation and qualifies the \#pragma once with # RT_WITHOUT_PRAGMA_ONCE like we do for our own headers (defined root templates). # # 1=, 2=, 3=, 4=, 5=install|stage # context vars: uid, gid, mode # if "$(VBOX_GCC_VERSION_CC)" < 30400 && "$(KBUILD_TARGET)" != "win" define crypto-headers_INSTALLER $$(RM) -f -- "$(2)" $$(SED) -e 's/^\([#][[:space:]]*\)pragma[[:space:]][[:space:]]*once.*/\1ifndef RT_WITHOUT_PRAGMA_ONCE\n\1 pragma once\n\1endif/' \ --output "$(2)" "$(1)" $(if $(mode),$(CHMOD) "$(mode)" -- "$(2)",) endef endif # # The templates used for the crypo lib and all its sublibraries. # TEMPLATE_LibCrypto = Template for the OpenSSL crypto library. TEMPLATE_LibCrypto_EXTENDS = VBoxR3RuntimeDllNonPedantic ifneq ($(KBUILD_TARGET),win) TEMPLATE_LibCrypto_ASTOOL = $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_TOOL) TEMPLATE_LibCrypto_ASFLAGS = -include $(VBOX_PATH_OPENSSL)/openssl-mangling.h TEMPLATE_LibCrypto_ASFLAGS.x86 = -m32 TEMPLATE_LibCrypto_ASFLAGS.amd64 = -m64 TEMPLATE_LibCrypto_ASDEFS = $(NO_SUCH_VARIABLE) TEMPLATE_LibCrypto_ASDEFS.darwin = OPENSSL_MANGLE_ASM if "$(VBOX_AS_VERSION)" != "" && "$(VBOX_AS_VERSION)" vlt "GNU assembler version 2.20" TEMPLATE_LibCrypto_ASFLAGS.solaris = -include $(VBOX_PATH_OPENSSL)/crypto/old-solaris-asm-trick.h endif endif TEMPLATE_LibCrypto_DEFS = \ $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_DEFS) \ VBOX_SUFF_DLL=$(VBOX_SUFF_DLL) \ DSO_NONE \ OPENSSL_USE_NODELETE \ OPENSSL_PIC \ OPENSSL_IA32_SSE2 \ OPENSSL_BUILDING_OPENSSL ifdef VBOX_WITH_CRYPTO_ASM TEMPLATE_LibCrypto_DEFS += \ OPENSSL_BN_ASM_MONT \ OPENSSL_BN_ASM_GF2m \ SHA1_ASM \ SHA256_ASM \ SHA512_ASM \ RC4_ASM \ MD5_ASM \ AES_ASM \ VPAES_ASM \ ECP_NISTZ256_ASM \ PADLOCK_ASM \ POLY1305_ASM TEMPLATE_LibCrypto_DEFS.amd64 = \ BSAES_ASM \ GHASH_ASM \ KECCAK1600_ASM \ OPENSSL_BN_ASM_MONT5 \ X25519_ASM else TEMPLATE_LibCrypto_DEFS += \ OPENSSL_NO_ASM endif if1of ($(KBUILD_TARGET), linux solaris) TEMPLATE_LibCrypto_DEFS += \ _REENTRANT \ _GNU_SOURCE endif ifeq ($(sort $(filter -fPIC,$(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS))),-fPIC) TEMPLATE_LibCrypto_DEFS += \ OPENSSL_PIC endif TEMPLATE_LibCrypto_DEFS.amd64 += \ MD32_REG_T=int ifeq ($(KBUILD_TARGET),win) TEMPLATE_LibCrypto_DEFS += \ OPENSSL_SYSNAME_WIN32 \ OPENSSL_RAND_SEED_OS # Exclude WinCrypt.h, causes trouble all over the place TEMPLATE_LibCrypto_DEFS += \ NOCRYPT endif if1of ($(KBUILD_TARGET_ARCH), x86 amd64 arm64) TEMPLATE_LibCrypto_DEFS += \ L_ENDIAN else TEMPLATE_LibCrypto_DEFS += \ B_ENDIAN endif ifeq ($(KBUILD_TARGET),os2) TEMPLATE_LibCrypto_DEFS += \ OPENSSL_NO_SECURE_MEMORY endif if defined(VBOX_WITH_PARFAIT) #&& VBOX_GCC_VERSION_CC == 50301 TEMPLATE_LibCrypto_DEFS += __STDC_NO_ATOMICS__ endif # Enable for running with valgrind: #TEMPLATE_LibCrypto_DEFS += PURIFY TEMPLATE_LibCrypto_CFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden),$(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS)) TEMPLATE_LibCrypto_CFLAGS.win = $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.win) TEMPLATE_LibCrypto_CFLAGS.win += -wd4305 # asn1_lib.c(455) : warning C4305: 'type cast' : truncation from 'const unsigned char *' to 'unsigned long' TEMPLATE_LibCrypto_CFLAGS.win += -wd4306 # tasn_new.c(338) : warning C4306: 'type cast' : conversion from 'int' to 'ASN1_VALUE *' of greater size TEMPLATE_LibCrypto_CFLAGS.win += -wd4701 # tasn_dec.c(840) : warning C4701: potentially uninitialized local variable 'buf' used TEMPLATE_LibCrypto_CFLAGS.win += -wd4101 # bn_asm.c(619) : warning C4101: 'bh' : unreferenced local variable TEMPLATE_LibCrypto_CFLAGS.win += -wd4206 # e_camellia.c(120) : warning C4206: nonstandard extension used : translation unit is empty TEMPLATE_LibCrypto_CFLAGS.win += -wd4232 # warning C4232: nonstandard extension used : 'malloc_func' : address of dllimport 'malloc' is not stati c, identity not guaranteed TEMPLATE_LibCrypto_CFLAGS.win += -wd4146 # x_long.c(79) : warning C4146: unary minus operator applied to unsigned type, result still unsigned TEMPLATE_LibCrypto_CFLAGS.win += -wd4130 # b_addr.c(750) : warning C4130: '==' : logical operation on address of string constant TEMPLATE_LibCrypto_CFLAGS.win += -wd4090 # ssl_lib.c(229) : warning C4090: 'function' : different 'const' qualifiers TEMPLATE_LibCrypto_CFLAGS.win += -wd4310 # bss_acpt.c(223) : warning C4310: cast truncates constant value [(int)INVALID_SOCKET] TEMPLATE_LibCrypto_CFLAGS.win += -wd4210 # bn_exp.c(913) : warning C4210: nonstandard extension used : function given file scope TEMPLATE_LibCrypto_CFLAGS.win += -wd4067 # mem.c(14) : warning C4067: unexpected tokens following preprocessor directive - expected a newline TEMPLATE_LibCrypto_CFLAGS.win += -wd4133 # ssl_local.h(2881): warning C4133: 'function': incompatible types - from 'volatile int *' to 'volatile LONG64 *' TEMPLATE_LibCrypto_CFLAGS.win += -wd4047 #threads_win.c(205): warning C4047: 'return': 'CRYPTO_THREAD_ID' differs in levels of indirection from 'DWORD' if1of ($(VBOX_VCC_TOOL_STEM), VCC120) TEMPLATE_LibCrypto_CFLAGS.win += -wd4005 # sdk\v7.1\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition endif TEMPLATE_LibCrypto_CFLAGS.freebsd = -std=gnu99 TEMPLATE_LibCrypto_INCS := \ $(dir $(VBOX_PATH_CRYPTO_HEADERS)) \ $(VBOX_PATH_OPENSSL) \ $(VBOX_PATH_OPENSSL)/include \ $(VBOX_PATH_OPENSSL)/providers/common/include \ $(VBOX_PATH_OPENSSL)/providers/implementations/include \ $(VBOX_PATH_OPENSSL)/gen-includes \ $(VBOX_PATH_CRYPTO)/include \ $(VBOX_PATH_CRYPTO_MODES) \ $(VBOX_PATH_CRYPTO)/ec/curve448 \ $(VBOX_PATH_CRYPTO)/ec/curve448/arch_32 \ $(patsubst %/openssl,%,$(VBOX_PATH_CRYPTO_HEADERS)) #TEMPLATE_LibCrypto_INTERMEDIATES = $($(crypto-headers)_1_STAGE_TARGET) TEMPLATE_LibCrypto_INTERMEDIATES := \ $(foreach f,$(crypto-headers_SOURCES),$(VBOX_PATH_CRYPTO_HEADERS)/$(lastword $(subst =>, ,$(f)))) # Same as LibCrypto except that we don't install these libraries. TEMPLATE_SubLibCrypto := Template for the OpenSSL crypto sub-libraries. TEMPLATE_SubLibCrypto_EXTENDS := LibCrypto TEMPLATE_SubLibCrypto_INSTTYPE := none # Somewhat similar to LibCrypto. TEMPLATE_LibCryptoTstExe = Template for the OpenSSL crypto testcases. TEMPLATE_LibCryptoTstExe_EXTENDS = VBoxR3TstExe TEMPLATE_LibCryptoTstExe_DEFS = $(TEMPLATE_VBoxR3TstExe_DEFS) $(filter-out $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_DEFS) IN_RT_R3,$(TEMPLATE_LibCrypto_DEFS)) TEMPLATE_LibCryptoTstExe_INCS = $(TEMPLATE_LibCrypto_INCS) $(TEMPLATE_VBoxR3TstExe_INCS) ifeq ($(KBUILD_TARGET),win) TEMPLATE_LibCryptoTstExe_CFLAGS = $(filter-out $(VBOX_VCC_WERR), $(TEMPLATE_VBoxR3TstExe_CXXFLAGS)) $(VBOX_VCC_NON_PEDANTIC) else TEMPLATE_LibCryptoTstExe_CFLAGS = $(filter-out $(VBOX_GCC_PEDANTIC_C), $(TEMPLATE_VBoxR3TstExe_CFLAGS)) $(VBOX_GCC_NON_PEDANTIC_C) endif TEMPLATE_LibCryptoTstExe_LIBS = $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) $(TEMPLATE_VBoxR3TstExe_LIBS) ifdef VBOX_WITH_BLD_RTSIGNTOOL_SIGNING # # Build program versions of LibCrypto and SubLibCrypto for bldRTSignTool. # TEMPLATE_VBoxLibCryptoBldProg = Build program template the OpenSSL crypto library. TEMPLATE_VBoxLibCryptoBldProg_EXTENDS := VBoxAdvBldProg TEMPLATE_VBoxLibCryptoBldProg_DEFS = $(TEMPLATE_VBoxAdvBldProg_DEFS) $(TEMPLATE_LibCrypto_DEFS) TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win = $(TEMPLATE_VBoxAdvBldProg_CFLAGS.win) $(subst $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.win),, $(TEMPLATE_LibCrypto_CFLAGS.win)) TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4057 # refcount.h(137): warning C4057: 'function': 'volatile long *' differs in indirection to slightly different base types from 'volatile int *' TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4100 # refcount.h(135): warning C4100: 'lock': unreferenced formal parameter TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4132 # curve25519.c(5497): warning C4132: 'allzeroes': const object should be initialized TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4189 # eng_list.c(373): warning C4189: 'load_dir': local variable is initialized but not referenced TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4245 # bn_div.c(353): warning C4245: '=': conversion from '__int64' to 'unsigned __int64', signed/unsigned mismatch TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4255 # ctype.c(314): warning C4255: 'ossl_c_locale': no function prototype given: converting '()' to '(void)' TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4267 # p12_utl.c(23): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4389 # encoder_pkey.c(110): warning C4389: '!=': signed/unsigned mismatch TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4668 # limits.h(70): warning C4668: '__STDC_WANT_SECURE_LIB__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4702 # ctrl_params_translate.c(681) : warning C4702: unreachable code TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.freebsd = $(TEMPLATE_VBoxAdvBldProg_CFLAGS.freebsd) $(subst $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.freebsd),, $(TEMPLATE_LibCrypto_CFLAGS.freebsd)) TEMPLATE_VBoxLibCryptoBldProg_INCS = $(TEMPLATE_LibCrypto_INCS) $(TEMPLATE_VBoxAdvBldProg_INCS) TEMPLATE_VBoxLibCryptoBldProg_INTERMEDIATES = $(TEMPLATE_VBoxAdvBldProg_INTERMEDIATES) $(TEMPLATE_LibCrypto_INTERMEDIATES) TEMPLATE_VBoxSubLibCryptoBldProg = Build program template a OpenSSL crypto sub-library. TEMPLATE_VBoxSubLibCryptoBldProg_EXTENDS := VBoxLibCryptoBldProg TEMPLATE_VBoxSubLibCryptoBldProg_INSTTYPE = none endif # VBOX_WITH_BLD_RTSIGNTOOL_SIGNING # # 32-bit version of LibCrypto and SubLibCrypto. # TEMPLATE_VBoxLibCrypto-x86 = 32-bit template for the OpenSSL crypto library. TEMPLATE_VBoxLibCrypto-x86_EXTENDS = LibCrypto TEMPLATE_VBoxLibCrypto-x86_BLD_TRG_ARCH = x86 TEMPLATE_VBoxLibCrypto-x86_DEFS = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_LibCrypto_DEFS)) HC_ARCH_BITS=32 ARCH_BITS=32 TEMPLATE_VBoxSubLibCrypto-x86 = 32-bit template for the OpenSSL crypto sub-library. TEMPLATE_VBoxSubLibCrypto-x86_EXTENDS = VBoxLibCrypto-x86 TEMPLATE_VBoxSubLibCrypto-x86_INSTTYPE = none ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition. define VBOX_OPENSSL_X86 $(eval LIBRARIES += $(1)-x86) $(1)-x86_TEMPLATE := VBoxSubLibCrypto-x86 $(1)-x86_EXTENDS := $(1) endef else define VBOX_OPENSSL_X86 endef endif