15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 include JavaCompilation.gmk 31 32 # The jars created in this file are required for the exploded jdk image to function and 33 # cannot wait to be built in the images target. 34 35 SECURITY_CLASSES_SUBDIR := modules 36 37 ########################################################################################## 38 # Create manifest for security jars 39 # 40 # Include these extra attributes for now, should probably take out. 41 # 42 MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf 43 JCE_MANIFEST := $(JDK_OUTPUTDIR)/lib/_the.security.manifest.mf 44 45 $(JCE_MANIFEST): $(MAINMANIFEST) 46 $(MKDIR) -p $(@D) 47 $(RM) $@ $@.tmp 48 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \ 49 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \ 50 $(MAINMANIFEST) >> $@.tmp 51 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp 52 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp 53 $(MV) $@.tmp $@ 54 55 ########################################################################################## 56 # For security and crypto jars, always build the jar, but for closed, install the prebuilt 57 # signed version instead of the newly built jar. Unsigned jars are treated as intermediate 58 # targets and explicitly added to the TARGETS list. For open, signing is not needed. See 59 # SignJars.gmk for more information. 60 # 61 # The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO 62 # variable is set to no if these jars can't be built to skip that step of the build. 63 # Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no 64 # other way to get the jars than to build them. 65 66 SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar 67 SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar 68 69 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \ 70 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.pkcs11, \ 71 SUFFIXES := .class, \ 72 INCLUDES := sun/security/pkcs11, \ 73 JAR := $(SUNPKCS11_JAR_UNSIGNED), \ 74 MANIFEST := $(JCE_MANIFEST), \ 75 SKIP_METAINF := true)) 76 77 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST) 78 79 ifndef OPENJDK 80 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar 81 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC) 82 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 83 $(install-file) 84 else 85 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) 86 $(install-file) 87 endif 88 89 TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST) 90 91 ########################################################################################## 92 93 SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar 94 SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar 95 96 $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \ 97 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ec, \ 98 SUFFIXES := .class, \ 99 INCLUDES := sun/security/ec, \ 100 JAR := $(SUNEC_JAR_UNSIGNED), \ 101 MANIFEST := $(JCE_MANIFEST), \ 102 SKIP_METAINF := true)) 103 104 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST) 105 106 ifndef OPENJDK 107 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar 108 $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC) 109 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 110 $(install-file) 111 else 112 $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) 113 $(install-file) 114 endif 115 116 TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST) 117 118 ########################################################################################## 119 120 SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar 121 SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar 122 123 ifneq ($(BUILD_CRYPTO), no) 124 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \ 125 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \ 126 SUFFIXES := .class, \ 127 INCLUDES := com/sun/crypto/provider, \ 128 JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \ 129 MANIFEST := $(JCE_MANIFEST), \ 130 SKIP_METAINF := true)) 131 132 $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST) 133 134 TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED) 135 endif 136 137 ifndef OPENJDK 138 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar 139 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC) 140 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 141 $(install-file) 142 else 143 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) 144 $(install-file) 145 endif 146 147 TARGETS += $(SUNJCE_PROVIDER_JAR_DST) 148 149 ########################################################################################## 150 151 JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar 152 JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar 153 154 ifneq ($(BUILD_CRYPTO), no) 155 $(eval $(call SetupArchive,BUILD_JCE_JAR, , \ 156 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \ 157 SUFFIXES := .class, \ 158 INCLUDES := javax/crypto sun/security/internal, \ 159 JAR := $(JCE_JAR_UNSIGNED), \ 160 MANIFEST := $(JCE_MANIFEST), \ 161 SKIP_METAINF := true)) 162 163 $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST) 164 165 TARGETS += $(JCE_JAR_UNSIGNED) 166 endif 167 168 ifndef OPENJDK 169 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar 170 $(JCE_JAR_DST): $(JCE_JAR_SRC) 171 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 172 $(install-file) 173 else 174 $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) 175 $(install-file) 176 endif 177 178 TARGETS += $(JCE_JAR_DST) 179 180 ########################################################################################## 181 182 ifeq ($(OPENJDK_TARGET_OS), windows) 183 184 SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar 185 SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar 186 187 $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \ 188 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.mscapi, \ 189 SUFFIXES := .class, \ 190 INCLUDES := sun/security/mscapi, \ 191 JAR := $(SUNMSCAPI_JAR_UNSIGNED), \ 192 MANIFEST := $(JCE_MANIFEST), \ 193 SKIP_METAINF := true)) 194 195 $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST) 196 197 ifndef OPENJDK 198 SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar 199 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC) 200 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 201 $(install-file) 202 else 203 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) 204 $(install-file) 205 endif 206 207 TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST) 208 209 endif 210 211 ########################################################################################## 212 213 ifeq ($(OPENJDK_TARGET_OS), solaris) 214 ifndef OPENJDK 215 216 UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar 217 UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar 218 UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar 219 220 $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \ 221 SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ucrypto, \ 222 SUFFIXES := .class, \ 223 INCLUDES := com/oracle/security/ucrypto, \ 224 JAR := $(UCRYPTO_JAR_UNSIGNED), \ 225 MANIFEST := $(JCE_MANIFEST), \ 226 SKIP_METAINF := true)) 227 228 $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST) 229 230 $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC) 231 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 232 $(install-file) 233 234 TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST) 235 236 endif 237 endif 238 239 all: $(TARGETS) 240 241 .PHONY: default all | 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 include JavaCompilation.gmk 31 32 # The jars created in this file are required for the exploded jdk image to function and 33 # cannot wait to be built in the images target. 34 35 ########################################################################################## 36 # Create manifest for security jars 37 # 38 # Include these extra attributes for now, should probably take out. 39 # 40 MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf 41 JCE_MANIFEST := $(JDK_OUTPUTDIR)/lib/_the.security.manifest.mf 42 43 $(JCE_MANIFEST): $(MAINMANIFEST) 44 $(MKDIR) -p $(@D) 45 $(RM) $@ $@.tmp 46 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \ 47 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \ 48 $(MAINMANIFEST) >> $@.tmp 49 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp 50 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp 51 $(MV) $@.tmp $@ 52 53 ########################################################################################## 54 # For security and crypto jars, always build the jar, but for closed, install the prebuilt 55 # signed version instead of the newly built jar. Unsigned jars are treated as intermediate 56 # targets and explicitly added to the TARGETS list. For open, signing is not needed. See 57 # SignJars.gmk for more information. 58 # 59 # The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO 60 # variable is set to no if these jars can't be built to skip that step of the build. 61 # Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no 62 # other way to get the jars than to build them. 63 64 SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar 65 SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar 66 67 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \ 68 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \ 69 SUFFIXES := .class, \ 70 INCLUDES := sun/security/pkcs11, \ 71 JAR := $(SUNPKCS11_JAR_UNSIGNED), \ 72 MANIFEST := $(JCE_MANIFEST), \ 73 SKIP_METAINF := true)) 74 75 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST) 76 77 ifndef OPENJDK 78 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar 79 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_SRC) 80 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 81 $(install-file) 82 else 83 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED) 84 $(install-file) 85 endif 86 87 TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST) 88 89 ########################################################################################## 90 91 SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar 92 SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar 93 94 $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \ 95 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \ 96 SUFFIXES := .class, \ 97 INCLUDES := sun/security/ec, \ 98 JAR := $(SUNEC_JAR_UNSIGNED), \ 99 MANIFEST := $(JCE_MANIFEST), \ 100 SKIP_METAINF := true)) 101 102 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST) 103 104 ifndef OPENJDK 105 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar 106 $(SUNEC_JAR_DST): $(SUNEC_JAR_SRC) 107 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 108 $(install-file) 109 else 110 $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED) 111 $(install-file) 112 endif 113 114 TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST) 115 116 ########################################################################################## 117 118 SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar 119 SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar 120 121 ifneq ($(BUILD_CRYPTO), no) 122 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \ 123 SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \ 124 SUFFIXES := .class, \ 125 INCLUDES := com/sun/crypto/provider, \ 126 JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \ 127 MANIFEST := $(JCE_MANIFEST), \ 128 SKIP_METAINF := true)) 129 130 $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST) 131 132 TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED) 133 endif 134 135 ifndef OPENJDK 136 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar 137 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_SRC) 138 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 139 $(install-file) 140 else 141 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED) 142 $(install-file) 143 endif 144 145 TARGETS += $(SUNJCE_PROVIDER_JAR_DST) 146 147 ########################################################################################## 148 149 JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar 150 JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar 151 152 ifneq ($(BUILD_CRYPTO), no) 153 $(eval $(call SetupArchive,BUILD_JCE_JAR, , \ 154 SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \ 155 SUFFIXES := .class, \ 156 INCLUDES := javax/crypto sun/security/internal, \ 157 JAR := $(JCE_JAR_UNSIGNED), \ 158 MANIFEST := $(JCE_MANIFEST), \ 159 SKIP_METAINF := true)) 160 161 $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST) 162 163 TARGETS += $(JCE_JAR_UNSIGNED) 164 endif 165 166 ifndef OPENJDK 167 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar 168 $(JCE_JAR_DST): $(JCE_JAR_SRC) 169 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 170 $(install-file) 171 else 172 $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED) 173 $(install-file) 174 endif 175 176 TARGETS += $(JCE_JAR_DST) 177 178 ########################################################################################## 179 180 ifeq ($(OPENJDK_TARGET_OS), windows) 181 182 SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar 183 SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar 184 185 $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \ 186 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \ 187 SUFFIXES := .class, \ 188 INCLUDES := sun/security/mscapi, \ 189 JAR := $(SUNMSCAPI_JAR_UNSIGNED), \ 190 MANIFEST := $(JCE_MANIFEST), \ 191 SKIP_METAINF := true)) 192 193 $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST) 194 195 ifndef OPENJDK 196 SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar 197 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_SRC) 198 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 199 $(install-file) 200 else 201 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED) 202 $(install-file) 203 endif 204 205 TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST) 206 207 endif 208 209 ########################################################################################## 210 211 ifeq ($(OPENJDK_TARGET_OS), solaris) 212 ifndef OPENJDK 213 214 UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar 215 UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar 216 UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar 217 218 $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \ 219 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \ 220 SUFFIXES := .class, \ 221 INCLUDES := com/oracle/security/ucrypto, \ 222 JAR := $(UCRYPTO_JAR_UNSIGNED), \ 223 MANIFEST := $(JCE_MANIFEST), \ 224 SKIP_METAINF := true)) 225 226 $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST) 227 228 $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_SRC) 229 @$(ECHO) $(LOG_INFO) Copying prebuilt $(@F) 230 $(install-file) 231 232 TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST) 233 234 endif 235 endif 236 237 all: $(TARGETS) 238 239 .PHONY: default all |