gnu-npth: update to 1.8
[oi-userland.git] / components / library / openssl / openssl-1.1 / Makefile
blob776c27cf38e02db81fa5196829209cb40aab31f3
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
21 # Copyright (c) 2011, 2020, Oracle and/or its affiliates.
24 BUILD_BITS= 32_and_64
25 include ../../../../make-rules/shared-macros.mk
27 COMPONENT_VERSION_SHORT= 1.1
28 COMPONENT_NAME= openssl-$(COMPONENT_VERSION_SHORT)
30 # When a new version of OpenSSL comes in, you must update both COMPONENT_VERSION
31 # and HUMAN_VERSION.
32 COMPONENT_VERSION= 1.1.1.23
33 HUMAN_VERSION= 1.1.1w
34 COMPONENT_REVISION= 4
35 COMPONENT_SUMMARY= OpenSSL - a Toolkit for Transport Layer (TLS v1+) protocols and general purpose cryptographic library
36 COMPONENT_PROJECT_URL= https://www.openssl.org/
37 COMPONENT_SRC= openssl-$(HUMAN_VERSION)
38 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
39 COMPONENT_ARCHIVE_HASH= sha256:cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
40 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)source/$(COMPONENT_ARCHIVE)
41 COMPONENT_FMRI= library/security/openssl-11
42 COMPONENT_CLASSIFICATION=System/Security
43 COMPONENT_LICENSE= OpenSSL, SSLeay
45 # Clone the patch files to the patches-all dir.
46 # COPY_COMMON_FILES is there so that the copy is called as soon as
47 # the Makefile is parsed.
48 PATCH_DIR=patches-all
49 COPY_COMMON_FILES:= rm -rf $(PATCH_DIR) && $(shell rsync -ac patches/ $(PATCH_DIR) && \
50 cp -p ../common/patches/043-x86_asm_illegal_subtraction.patch $(PATCH_DIR))
52 include $(WS_MAKE_RULES)/common.mk
54 PATH= $(GCC_ROOT)/bin:$(PATH.illumos)
56 # OpenSSL does not use autoconf but its own configure system.
57 CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
58 CONFIG_SHELL=
60 # This is to force OpenSSL's Configure script to use gmake for 'make links'.
61 # Otherwise it fails with:
62 # mksh: Fatal error in reader: Unmatched `(' on line
63 CONFIGURE_ENV += MAKE="$(GMAKE)"
65 CONFIGURE_OPTIONS = -DNO_WINDOWS_BRAINDEATH
66 CONFIGURE_OPTIONS += --openssldir=/etc/openssl/1.1
67 CONFIGURE_OPTIONS += --prefix=/usr/openssl/1.1
68 CONFIGURE_OPTIONS += --libdir=lib/$(ARCHLIBSUBDIR)
69 # comply with API 1.0 for now
70 CONFIGURE_OPTIONS += --api=1.0.0
71 #XXX: keep enabled for now
72 CONFIGURE_OPTIONS += enable-ssl2
73 CONFIGURE_OPTIONS += enable-ssl3
74 # disabled algorithms
75 CONFIGURE_OPTIONS += no-rc2
76 #XXX: keep for wpa_supplicant
77 #CONFIGURE_OPTIONS += no-rc4
78 CONFIGURE_OPTIONS += no-rc5
79 #XXX: keep for wget
80 #CONFIGURE_OPTIONS += no-md4
81 CONFIGURE_OPTIONS += no-mdc2
82 CONFIGURE_OPTIONS += no-idea
83 CONFIGURE_OPTIONS += no-whirlpool
84 CONFIGURE_OPTIONS += no-seed
85 # disabled engines
86 CONFIGURE_OPTIONS += no-afalgeng
87 CONFIGURE_OPTIONS += no-capieng
88 CONFIGURE_OPTIONS += no-hw-padlock
89 # explicitly enabled
90 ifeq ($(strip $(MACH)),i386)
91 CONFIGURE_OPTIONS.64 += enable-ec_nistp_64_gcc_128
92 endif
94 # We define our own compiler and linker option sets for Solaris. See Configure
95 # for more information.
96 CONFIGURE_OPTIONS32_i386 = solaris-x86-gcc
97 CONFIGURE_OPTIONS32_sparc = solaris-sparcv9-gcc
98 CONFIGURE_OPTIONS64_i386 = solaris64-x86_64-gcc
99 CONFIGURE_OPTIONS64_sparc = solaris64-sparcv9-gcc
101 # Options specific to regular build.
102 # They must not be specified as common, as they cannot be overridden.
103 $(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += \
104 $(CONFIGURE_OPTIONS32_$(MACH))
105 $(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += \
106 $(CONFIGURE_OPTIONS64_$(MACH))
108 # Always be super careful when appending to POST/PRE actions.
109 # We need to make sure that if any sub-action fails, the whole recipe fails,
110 # hence explicit exit is added to each append.
111 COMPONENT_POST_BUILD_ACTION += files/verify_build.sh $(@D) $(CC) $(BITS) || exit 1;
113 # OpenSSL has its own configure system which must be run from the fully
114 # populated source code directory. However, the Userland configuration phase is
115 # run from the build directory. So, we must get the full source code into the
116 # build directory.
117 COMPONENT_PRE_CONFIGURE_ACTION = \
118 $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) && \
119 echo $(PROTO_DIR); echo "RunPath"; echo $(BITS); echo $(WS_MAKE_RULES);
122 # The test 'test_ca' is removed because it depends on directories not present
123 # in the build directory.
125 COMPONENT_POST_CONFIGURE_ACTION = \
126 ( echo "Patching Makefile..." && \
127 $(GPATCH) -p0 $(@D)/Makefile patches-post-config/Makefile.patch && \
128 echo "Removing test_ca test" && \
129 $(RM) $(SOURCE_DIR)/test/recipes/*-test_ca.t $(@D)/test/recipes/*-test_ca.t; )
131 # We add /usr/perl5/bin to PATH so that OpenSSL install code can locate the
132 # system pod2man. If not set, OpenSSL make would use an internal implementation
133 # from the tarball which would corrupt some man pages.
135 # The MANSUFFIX needs to be complemented by patches/002-man_page_suffix.patch
136 COMPONENT_INSTALL_ARGS += PATH=$(PATH) MANSUFFIX=openssl
138 # Lint targets expect that PROTOUSRLIBDIR{,64} directories exist.
139 # Since everything is installed into distinct directory trees, these
140 # need to be created explicitly. These actions are probably temporary -
141 # once 1.1 will start deliver to the usual directories, these can be removed.
142 COMPONENT_PRE_INSTALL_ACTION += (\
143 echo "Ensuring library directories exist in the proto area"; \
144 test -d $(PROTOUSRLIBDIR) || $(MKDIR) $(PROTOUSRLIBDIR); \
145 test -d $(PROTOUSRLIBDIR64) || $(MKDIR) $(PROTOUSRLIBDIR64);)
148 # There is also separate STC test suite 'openssl'
149 # for regression testing. These internal tests are unit tests only.
151 COMPONENT_TEST_TARGETS = test
153 COMPONENT_TEST_TRANSFORMS = \
154 '-n ' \
155 '-e "/PASS/p" ' \
156 '-e "/skipped/p" ' \
157 '-e "/ok/p" ' \
158 '-e "/success/p" '
160 REQUIRED_PACKAGES += developer/build/makedepend
162 # Auto-generated dependencies
163 REQUIRED_PACKAGES += SUNWcs
164 REQUIRED_PACKAGES += runtime/perl
165 REQUIRED_PACKAGES += system/library