1 #
2 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
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
|
1 #
2 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
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 ##########################################################################################
33 # Create manifest for security jars
34 #
35 # Include these extra attributes for now, should probably take out.
36 #
37 MAINMANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf
38 JCE_MANIFEST := $(JDK_OUTPUTDIR)/jce/unsigned/_the.security.manifest.mf
39
40 $(JCE_MANIFEST): $(MAINMANIFEST)
41 $(MKDIR) -p $(@D)
42 $(RM) $@ $@.tmp
43 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
44 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
45 $(MAINMANIFEST) >> $@.tmp
46 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
47 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
48 $(ECHO) "Release-Version: $(RELEASE)" >> $@.tmp
49 $(MV) $@.tmp $@
50
51 ##########################################################################################
52 # For crypto jars, always build the jar.
53 #
54 # The source for the crypto jars is not available for all licensees.
55 # The BUILD_CRYPTO variable is set to no if these jars can't be built
56 # to skip that step of the build.
57
58 SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
59 SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
60
61 $(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
62 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.pkcs11, \
63 SUFFIXES := .class, \
64 INCLUDES := sun/security/pkcs11, \
65 JAR := $(SUNPKCS11_JAR_UNSIGNED), \
66 MANIFEST := $(JCE_MANIFEST), \
67 SKIP_METAINF := true))
68
69 $(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
70
71 $(SUNPKCS11_JAR_DST): $(SUNPKCS11_JAR_UNSIGNED)
72 $(install-file)
73
74 TARGETS += $(SUNPKCS11_JAR_UNSIGNED) $(SUNPKCS11_JAR_DST)
75
76 ##########################################################################################
77
78 SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
79 SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
80
81 $(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
82 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ec, \
83 SUFFIXES := .class, \
84 INCLUDES := sun/security/ec, \
85 JAR := $(SUNEC_JAR_UNSIGNED), \
86 MANIFEST := $(JCE_MANIFEST), \
87 SKIP_METAINF := true))
88
89 $(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
90
91 $(SUNEC_JAR_DST): $(SUNEC_JAR_UNSIGNED)
92 $(install-file)
93
94 TARGETS += $(SUNEC_JAR_UNSIGNED) $(SUNEC_JAR_DST)
95
96 ##########################################################################################
97
98 SUNJCE_PROVIDER_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunjce_provider.jar
99 SUNJCE_PROVIDER_JAR_UNSIGNED := \
100 $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.jar
101
102 ifneq ($(BUILD_CRYPTO), no)
103 $(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
104 SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
105 SUFFIXES := .class, \
106 INCLUDES := com/sun/crypto/provider, \
107 JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
108 MANIFEST := $(JCE_MANIFEST), \
109 SKIP_METAINF := true))
110
111 $(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
112
113 TARGETS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
114 endif
115
116 $(SUNJCE_PROVIDER_JAR_DST): $(SUNJCE_PROVIDER_JAR_UNSIGNED)
117 $(install-file)
118
119 TARGETS += $(SUNJCE_PROVIDER_JAR_DST)
120
121 ##########################################################################################
122
123 JCE_JAR_DST := $(JDK_OUTPUTDIR)/lib/jce.jar
124 JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
125
126 ifneq ($(BUILD_CRYPTO), no)
127 $(eval $(call SetupArchive,BUILD_JCE_JAR, , \
128 SRCS := $(JDK_OUTPUTDIR)/modules/java.base, \
129 SUFFIXES := .class, \
130 INCLUDES := javax/crypto sun/security/internal, \
131 JAR := $(JCE_JAR_UNSIGNED), \
132 MANIFEST := $(JCE_MANIFEST), \
133 SKIP_METAINF := true))
134
135 $(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
136
137 TARGETS += $(JCE_JAR_UNSIGNED)
138 endif
139
140 $(JCE_JAR_DST): $(JCE_JAR_UNSIGNED)
141 $(install-file)
142
143 TARGETS += $(JCE_JAR_DST)
144
145 ##########################################################################################
146
147 ifeq ($(OPENJDK_TARGET_OS), windows)
148
149 SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
150 SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
151
152 $(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
153 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.mscapi, \
154 SUFFIXES := .class, \
155 INCLUDES := sun/security/mscapi, \
156 JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
157 MANIFEST := $(JCE_MANIFEST), \
158 SKIP_METAINF := true))
159
160 $(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
161
162 $(SUNMSCAPI_JAR_DST): $(SUNMSCAPI_JAR_UNSIGNED)
163 $(install-file)
164
165 TARGETS += $(SUNMSCAPI_JAR_UNSIGNED) $(SUNMSCAPI_JAR_DST)
166
167 endif
168
169 ##########################################################################################
170
171 ifeq ($(OPENJDK_TARGET_OS), solaris)
172 ifndef OPENJDK
173
174 UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
175 UCRYPTO_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/ucrypto.jar
176
177 $(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
178 SRCS := $(JDK_OUTPUTDIR)/modules/jdk.crypto.ucrypto, \
179 SUFFIXES := .class, \
180 INCLUDES := com/oracle/security/ucrypto, \
181 JAR := $(UCRYPTO_JAR_UNSIGNED), \
182 MANIFEST := $(JCE_MANIFEST), \
183 SKIP_METAINF := true))
184
185 $(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
186
187 $(UCRYPTO_JAR_DST): $(UCRYPTO_JAR_UNSIGNED)
188 $(install-file)
189
190 TARGETS += $(UCRYPTO_JAR_UNSIGNED) $(UCRYPTO_JAR_DST)
191
192 endif
193 endif
194
195 all: $(TARGETS)
196
197 .PHONY: default all
|