blob: 3225a862653c7f7018a510b8aa1c4784735f95f9 [file] [log] [blame]
erikje78df742012-06-07 20:40:50 -07001#
dholmes85dd5c82013-01-21 23:17:58 -05002# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
erikje78df742012-06-07 20:40:50 -07003# 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
26include $(SPEC)
27include MakeBase.gmk
28include JavaCompilation.gmk
29include Setup.gmk
30
31default: all
32
erikj754c7442012-12-27 20:18:42 +010033# Prepare the find cache. Only used if running on windows.
34$(eval $(call FillCacheFind,$(JDK_OUTPUTDIR)/classes))
35
erikje78df742012-06-07 20:40:50 -070036include Tools.gmk
37
dholmes85dd5c82013-01-21 23:17:58 -050038include Profiles.gmk
39
erikjaf85fc42012-07-03 16:10:44 -070040#
41# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
42#
43MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
dholmes85dd5c82013-01-21 23:17:58 -050044#
45# And similarly for the Profiles
46PROFILE_MAKEFILES=$(JDK_TOPDIR)/makefiles/Profiles.gmk $(JDK_TOPDIR)/makefiles/profile-rtjar-includes.txt
erikje78df742012-06-07 20:40:50 -070047
48MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
49BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
50
ohairb71409c2012-10-26 14:23:29 -070051$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/lib))
52
erikje78df742012-06-07 20:40:50 -070053##########################################################################################
54
ohairb71409c2012-10-26 14:23:29 -070055$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,,\
erikje78df742012-06-07 20:40:50 -070056 SRCS:=$(JDK_OUTPUTDIR)/classes,\
erikjaf85fc42012-07-03 16:10:44 -070057 SUFFIXES:=.class .gif .png .properties,\
erikje78df742012-06-07 20:40:50 -070058 INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
59 JARMAIN:=sun.tools.jconsole.JConsole,\
ohairb71409c2012-10-26 14:23:29 -070060 JAR:=$(IMAGES_OUTPUTDIR)/lib/jconsole.jar,\
erikje78df742012-06-07 20:40:50 -070061 SKIP_METAINF:=true))
62
erikje78df742012-06-07 20:40:50 -070063
64##########################################################################################
65
ohairb71409c2012-10-26 14:23:29 -070066$(eval $(call SetupArchive,BUILD_DNS_JAR,,\
erikje78df742012-06-07 20:40:50 -070067 SRCS:=$(JDK_OUTPUTDIR)/classes,\
68 INCLUDES:=sun/net/spi/nameservice/dns,\
69 EXTRA_FILES:=META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor,\
ohairb71409c2012-10-26 14:23:29 -070070 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar,\
erikje78df742012-06-07 20:40:50 -070071 SKIP_METAINF:=true))
72
erikje78df742012-06-07 20:40:50 -070073
74##########################################################################################
75
naoto85d2c712012-10-31 11:33:36 -070076LOCALEDATA_INCLUDE_LOCALES := ar be bg ca cs da de el es et fi fr ga hi hr hu in is it \
77 iw ja ko lt lv mk ms mt nl no pl pt ro ru sk sl sq sr sv \
78 th tr uk vi zh
79
naotoc378ffc2012-08-21 11:00:30 -070080LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/,$(LOCALEDATA_INCLUDE_LOCALES)) \
81 $(addprefix sun/util/resources/,$(LOCALEDATA_INCLUDE_LOCALES))
erikje78df742012-06-07 20:40:50 -070082
naoto85d2c712012-10-31 11:33:36 -070083# For non-US English locale data
84
85LOCALEDATA_INCLUDES += \
86 sun/text/resources/en/FormatData_en_AU.class \
87 sun/text/resources/en/FormatData_en_CA.class \
88 sun/text/resources/en/FormatData_en_GB.class \
89 sun/text/resources/en/FormatData_en_IE.class \
90 sun/text/resources/en/FormatData_en_IN.class \
91 sun/text/resources/en/FormatData_en_MT.class \
92 sun/text/resources/en/FormatData_en_NZ.class \
93 sun/text/resources/en/FormatData_en_PH.class \
94 sun/text/resources/en/FormatData_en_SG.class \
95 sun/text/resources/en/FormatData_en_ZA.class \
96 sun/util/resources/en/CalendarData_en_GB.class \
97 sun/util/resources/en/CalendarData_en_IE.class \
98 sun/util/resources/en/CalendarData_en_MT.class \
99 sun/util/resources/en/CurrencyNames_en_AU.class \
100 sun/util/resources/en/CurrencyNames_en_CA.class \
101 sun/util/resources/en/CurrencyNames_en_GB.class \
102 sun/util/resources/en/CurrencyNames_en_IE.class \
103 sun/util/resources/en/CurrencyNames_en_IN.class \
104 sun/util/resources/en/CurrencyNames_en_MT.class \
105 sun/util/resources/en/CurrencyNames_en_NZ.class \
106 sun/util/resources/en/CurrencyNames_en_PH.class \
107 sun/util/resources/en/CurrencyNames_en_SG.class \
108 sun/util/resources/en/CurrencyNames_en_ZA.class \
109 sun/util/resources/en/LocaleNames_en_MT.class \
110 sun/util/resources/en/LocaleNames_en_PH.class \
111 sun/util/resources/en/LocaleNames_en_SG.class \
112 sun/util/resources/en/TimeZoneNames_en_CA.class \
113 sun/util/resources/en/TimeZoneNames_en_GB.class \
114 sun/util/resources/en/TimeZoneNames_en_IE.class
115
erikje78df742012-06-07 20:40:50 -0700116$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\
117 SRCS:=$(JDK_OUTPUTDIR)/classes,\
118 SUFFIXES:=.class _dict _th,\
119 INCLUDES:=$(LOCALEDATA_INCLUDES),\
naotoc378ffc2012-08-21 11:00:30 -0700120 EXCLUDES:=sun/text/resources/th/BreakIteratorRules_th.class,\
ohairb71409c2012-10-26 14:23:29 -0700121 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar,\
erikje78df742012-06-07 20:40:50 -0700122 SKIP_METAINF:=true))
123
erikje78df742012-06-07 20:40:50 -0700124##########################################################################################
dholmes85dd5c82013-01-21 23:17:58 -0500125#
126# Different variants of rt.jar are built based on the current profile. The output
127# directory is augmented with the profile name so that the final jar file and all the
128# intermediary list files will be in directory. This has the form lib$PROFILE rather than
129# lib/$PROFILE so that it won't get copied as part of the image generation process.
130# Each profile customizes the RT_JAR_EXCLUDES variable.
131#
132##########################################################################################
erikje78df742012-06-07 20:40:50 -0700133
dholmes85dd5c82013-01-21 23:17:58 -0500134# Full JRE exclude list for rt.jar and resources.jar
135# This value should exclude types destined for jars other than rt.jar and resources.jar.
136# When building a Profile this value augments the profile specific exclusions
137RT_JAR_EXCLUDES += \
erikj2762cda2013-01-02 15:35:12 +0100138 com/oracle/security \
erikjf08e4b12013-01-04 16:54:41 +0100139 com/sun/codemodel \
140 com/sun/crypto/provider \
141 com/sun/istack/internal/tools \
142 com/sun/jarsigner \
raginip450da982013-01-18 11:33:31 -0800143 com/sun/java/accessibility \
erikje78df742012-06-07 20:40:50 -0700144 com/sun/javadoc \
145 com/sun/jdi \
erikje78df742012-06-07 20:40:50 -0700146 com/sun/net/ssl/internal/ssl \
erikjf08e4b12013-01-04 16:54:41 +0100147 com/sun/source \
148 com/sun/tools \
erikje78df742012-06-07 20:40:50 -0700149 com/sun/xml/internal/dtdparser \
150 com/sun/xml/internal/rngom \
151 com/sun/xml/internal/xsom \
erikjf08e4b12013-01-04 16:54:41 +0100152 javax/crypto \
erikje78df742012-06-07 20:40:50 -0700153 javax/swing/AbstractButtonBeanInfo.class \
erikjf08e4b12013-01-04 16:54:41 +0100154 javax/swing/beaninfo \
erikje78df742012-06-07 20:40:50 -0700155 javax/swing/BoxBeanInfo.class \
156 javax/swing/JAppletBeanInfo.class \
157 javax/swing/JButtonBeanInfo.class \
158 javax/swing/JCheckBoxBeanInfo.class \
159 javax/swing/JCheckBoxMenuItemBeanInfo.class \
160 javax/swing/JColorChooserBeanInfo.class \
161 javax/swing/JComboBoxBeanInfo.class \
162 javax/swing/JComponentBeanInfo.class \
163 javax/swing/JDesktopPaneBeanInfo.class \
164 javax/swing/JDialogBeanInfo.class \
165 javax/swing/JEditorPaneBeanInfo.class \
166 javax/swing/JFileChooserBeanInfo.class \
167 javax/swing/JFormattedTextFieldBeanInfo.class \
168 javax/swing/JFrameBeanInfo.class \
169 javax/swing/JInternalFrameBeanInfo.class \
170 javax/swing/JLabelBeanInfo.class \
171 javax/swing/JLayeredPaneBeanInfo.class \
172 javax/swing/JListBeanInfo.class \
173 javax/swing/JMenuBarBeanInfo.class \
174 javax/swing/JMenuBeanInfo.class \
175 javax/swing/JMenuItemBeanInfo.class \
176 javax/swing/JOptionPaneBeanInfo.class \
177 javax/swing/JPanelBeanInfo.class \
178 javax/swing/JPasswordFieldBeanInfo.class \
179 javax/swing/JPopupMenuBeanInfo.class \
180 javax/swing/JProgressBarBeanInfo.class \
181 javax/swing/JRadioButtonBeanInfo.class \
182 javax/swing/JRadioButtonMenuItemBeanInfo.class \
183 javax/swing/JScrollBarBeanInfo.class \
184 javax/swing/JScrollPaneBeanInfo.class \
185 javax/swing/JSeparatorBeanInfo.class \
186 javax/swing/JSliderBeanInfo.class \
187 javax/swing/JSpinnerBeanInfo.class \
188 javax/swing/JSplitPaneBeanInfo.class \
189 javax/swing/JTabbedPaneBeanInfo.class \
190 javax/swing/JTableBeanInfo.class \
191 javax/swing/JTextAreaBeanInfo.class \
192 javax/swing/JTextFieldBeanInfo.class \
193 javax/swing/JTextPaneBeanInfo.class \
194 javax/swing/JToggleButtonBeanInfo.class \
195 javax/swing/JToolBarBeanInfo.class \
196 javax/swing/JTreeBeanInfo.class \
197 javax/swing/JWindowBeanInfo.class \
198 javax/swing/SwingBeanInfoBase.class \
199 javax/swing/text/JTextComponentBeanInfo.class \
erikjf08e4b12013-01-04 16:54:41 +0100200 META-INF/services/com.sun.jdi.connect.Connector \
201 META-INF/services/com.sun.jdi.connect.spi.TransportService \
202 META-INF/services/com.sun.tools.attach.spi.AttachProvider \
203 META-INF/services/com.sun.tools.xjc.Plugin \
erikjf08e4b12013-01-04 16:54:41 +0100204 META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
205 org/relaxng/datatype \
206 sun/awt/HKSCS.class \
207 sun/awt/motif/X11GB2312.class \
dholmes8127a4f2013-03-14 01:47:59 -0400208 sun/awt/motif/X11GB2312\$$$$Decoder.class \
209 sun/awt/motif/X11GB2312\$$$$Encoder.class \
erikjf08e4b12013-01-04 16:54:41 +0100210 sun/awt/motif/X11GBK.class \
dholmes8127a4f2013-03-14 01:47:59 -0400211 sun/awt/motif/X11GBK\$$$$Encoder.class \
erikjf08e4b12013-01-04 16:54:41 +0100212 sun/awt/motif/X11KSC5601.class \
dholmes8127a4f2013-03-14 01:47:59 -0400213 sun/awt/motif/X11KSC5601\$$$$Decoder.class \
214 sun/awt/motif/X11KSC5601\$$$$Encoder.class \
erikjf08e4b12013-01-04 16:54:41 +0100215 sun/jvmstat \
216 sun/net/spi/nameservice/dns \
217 sun/nio/cs/ext \
218 sun/rmi/rmic \
vinnie3d4ca6e2013-05-14 18:08:18 +0100219 sun/security/ec \
erikjf08e4b12013-01-04 16:54:41 +0100220 sun/security/internal \
221 sun/security/mscapi \
222 sun/security/pkcs11 \
223 sun/security/provider/Sun.class \
224 sun/security/rsa/SunRsaSign.class \
225 sun/security/ssl \
226 sun/security/tools/jarsigner \
erikje78df742012-06-07 20:40:50 -0700227 sun/swing/BeanInfoUtils.class \
naotoc378ffc2012-08-21 11:00:30 -0700228 sun/text/resources/cldr \
erikjf08e4b12013-01-04 16:54:41 +0100229 sun/tools/asm \
230 sun/tools/attach \
231 sun/tools/java \
232 sun/tools/javac \
233 sun/tools/jcmd \
234 sun/tools/jconsole \
235 sun/tools/jinfo \
236 sun/tools/jmap \
237 sun/tools/jps \
238 sun/tools/jstack \
239 sun/tools/jstat \
240 sun/tools/jstatd \
241 sun/tools/native2ascii \
242 sun/tools/serialver \
243 sun/tools/tree \
244 sun/tools/util \
245 sun/util/cldr/CLDRLocaleDataMetaInfo.class \
naotoc378ffc2012-08-21 11:00:30 -0700246 sun/util/resources/cldr \
dholmes85dd5c82013-01-21 23:17:58 -0500247 $(LOCALEDATA_INCLUDES) \
erikje78df742012-06-07 20:40:50 -0700248 com/oracle/jrockit/jfr \
249 oracle/jrockit/jfr
erikjaf85fc42012-07-03 16:10:44 -0700250
251ifeq ($(OPENJDK_TARGET_OS), macosx)
252 RT_JAR_EXCLUDES += com/sun/nio/sctp \
ohrstrom70c34532012-11-08 12:25:15 +0100253 sun/nio/ch/sctp
erikje78df742012-06-07 20:40:50 -0700254endif
255
256# Find all files in the classes dir to use as dependencies. This could be more fine granular.
erikj754c7442012-12-27 20:18:42 +0100257ALL_FILES_IN_CLASSES := $(call not-containing,_the.,$(filter-out %javac_state,\
258 $(call CacheFind,$(JDK_OUTPUTDIR)/classes)))
erikje78df742012-06-07 20:40:50 -0700259
dholmes85dd5c82013-01-21 23:17:58 -0500260RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
261RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
erikje78df742012-06-07 20:40:50 -0700262
263$(RT_JAR_MANIFEST_FILE): $(MAINMANIFEST) $(BEANMANIFEST)
264 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700265 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700266 $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
267 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
ohair46fcac92012-09-18 11:29:24 -0700268 $(MAINMANIFEST) >> $@.tmp
269 $(ECHO) >> $@.tmp
270 $(CAT) $(BEANMANIFEST) >> $@.tmp
271 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700272
273$(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
274 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700275 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700276 $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
277 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
ohair46fcac92012-09-18 11:29:24 -0700278 $(MAINMANIFEST) >> $@.tmp
279 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700280
dholmes85dd5c82013-01-21 23:17:58 -0500281$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude: $(MAKEFILE) $(PROFILE_MAKEFILES)
erikje78df742012-06-07 20:40:50 -0700282 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700283 $(RM) $@ $@.tmp
284 $(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@.tmp)
285 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700286
ohairb71409c2012-10-26 14:23:29 -0700287$(IMAGES_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
erikjaf85fc42012-07-03 16:10:44 -0700288 $(MAKEFILE)
289 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700290 $(RM) $@ $@.tmp
291 $(TOOL_ADDJSUM) $< $@.tmp
292 $(MV) $@.tmp $@
erikjaf85fc42012-07-03 16:10:44 -0700293
dholmes85dd5c82013-01-21 23:17:58 -0500294$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
ohairb71409c2012-10-26 14:23:29 -0700295 $(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
erikje78df742012-06-07 20:40:50 -0700296 $(MKDIR) -p $(@D)
ohair46fcac92012-09-18 11:29:24 -0700297 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700298 ($(CD) $(JDK_OUTPUTDIR)/classes && \
299 $(TOOL_JARREORDER) \
dholmes85dd5c82013-01-21 23:17:58 -0500300 -o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
ohair46fcac92012-09-18 11:29:24 -0700301 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700302
dholmes85dd5c82013-01-21 23:17:58 -0500303$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
ohair46fcac92012-09-18 11:29:24 -0700304 $(MKDIR) -p $(@D)
305 $(RM) $@ $@.tmp
dholmes85dd5c82013-01-21 23:17:58 -0500306 $(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
307ifneq ($(PROFILE),)
308# # Add back classes from excluded packages (fixing the $ substitution in the process)
309 for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
310 $(ECHO) $$type >> $@.tmp ; \
311 done
312endif
ohair46fcac92012-09-18 11:29:24 -0700313 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700314
dholmes85dd5c82013-01-21 23:17:58 -0500315$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents
ohair46fcac92012-09-18 11:29:24 -0700316 $(MKDIR) -p $(@D)
317 $(RM) $@ $@.tmp
318 $(GREP) -v -e '\.class$$' \
319 -e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
dholmes85dd5c82013-01-21 23:17:58 -0500320 $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
321ifneq ($(PROFILE),)
322# # Strip out all META-INF/services/ entries
323 $(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
324# # Add back the required services
325# # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
326# # we get a syntax error from sh. That doesn't happen on linux
327 for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
328 $(ECHO) $$service >> $@.tmp2; \
329 done
330 $(MV) $@.tmp2 $@.tmp
331endif
ohair46fcac92012-09-18 11:29:24 -0700332 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700333
dholmes85dd5c82013-01-21 23:17:58 -0500334# This is a hack but I don't know how to make this fit into the existing scheme
335$(PROFILE_VERSION_CLASS_TARGETS) : $(PROFILE_VERSION_JAVA_TARGETS)
336 @$(JAVAC) -d $(@D)/../../ $(@D)/$(VERSION_JAVA_FILE)
337
338
339# Support for removing the addPropertyChangeListener and removePropertyChangeListener
dholmes8127a4f2013-03-14 01:47:59 -0400340# methods from classes that only go into the profile builds.
dholmes85dd5c82013-01-21 23:17:58 -0500341BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless
342
dholmes8127a4f2013-03-14 01:47:59 -0400343# When there are $ characters in filenames we have some very subtle interactions between
344# make expansion and shell expansion. In this particular case $< will contain a single $ while
345# $@ will contain \$. So we have to pass $< in single-quotes to avoid shell expansion
dholmes85dd5c82013-01-21 23:17:58 -0500346$(BEANLESS_CLASSES)/%: $(JDK_OUTPUTDIR)/classes/%
347 $(MKDIR) -p $(@D)
dholmes8127a4f2013-03-14 01:47:59 -0400348 $(TOOL_REMOVEMETHODS) '$<' $@ addPropertyChangeListener removePropertyChangeListener
dholmes85dd5c82013-01-21 23:17:58 -0500349
350CLASSES_TO_DEBEAN = \
351 java/util/logging/LogManager.class \
dholmes8127a4f2013-03-14 01:47:59 -0400352 java/util/jar/Pack200\$$Packer.class \
353 java/util/jar/Pack200\$$Unpacker.class \
dholmes85dd5c82013-01-21 23:17:58 -0500354 com/sun/java/util/jar/pack/PackerImpl.class \
dholmes8127a4f2013-03-14 01:47:59 -0400355 com/sun/java/util/jar/pack/UnpackerImpl.class
dholmes85dd5c82013-01-21 23:17:58 -0500356
dholmes85dd5c82013-01-21 23:17:58 -0500357ifneq ($(PROFILE),)
dholmes8127a4f2013-03-14 01:47:59 -0400358 BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN))
erikjaf85fc42012-07-03 16:10:44 -0700359endif
360
dholmes85dd5c82013-01-21 23:17:58 -0500361
362RT_JAR_CREATE_OPTIONS := c0fm
363RT_JAR_UPDATE_OPTIONS := u0f
364ifeq ($(COMPRESS_JARS), true)
365 RT_JAR_CREATE_OPTIONS := cfm
366 RT_JAR_UPDATE_OPTIONS := uf
367endif
368
369# This defines a target-specific variables to make the shell logic easier to see.
370# We need to find the Version.class file for the profile currently being built
371$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: \
372 CLASS_FILE = $(if $(PROFILE),$(strip $(foreach class,$(PROFILE_VERSION_CLASS_TARGETS),$(if $(findstring $(PROFILE),$(class)),$(class)))), NO_SUCH_FILE)
373# This is the real target
374$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE) $(PROFILE_VERSION_CLASS_TARGETS) $(BEANLESS_CLASSES_TARGETS)
375 $(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
ohair46fcac92012-09-18 11:29:24 -0700376 $(MKDIR) -p $(@D)
377 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700378 $(CD) $(JDK_OUTPUTDIR)/classes && \
ohair46fcac92012-09-18 11:29:24 -0700379 $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
dholmes85dd5c82013-01-21 23:17:58 -0500380 @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
381 if [ -f $(CLASS_FILE) ]; then \
382 $(ECHO) Updating rt.jar $(PROFILE) && \
383 $(CD) $(patsubst %$(VERSION_CLASS_PATH),%,$(CLASS_FILE)) && \
384 $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(VERSION_CLASS_PATH); \
dholmes85dd5c82013-01-21 23:17:58 -0500385 $(CD) $(BEANLESS_CLASSES) && \
dholmes8127a4f2013-03-14 01:47:59 -0400386 $(JAR) $(RT_JAR_UPDATE_OPTIONS) $@.tmp $(CLASSES_TO_DEBEAN); \
dholmes85dd5c82013-01-21 23:17:58 -0500387 fi
ohair46fcac92012-09-18 11:29:24 -0700388 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700389
dholmes85dd5c82013-01-21 23:17:58 -0500390$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents \
erikje78df742012-06-07 20:40:50 -0700391 $(RESOURCE_JAR_MANIFEST_FILE)
392 $(ECHO) Creating resources.jar
ohair46fcac92012-09-18 11:29:24 -0700393 $(MKDIR) -p $(@D)
394 $(RM) $@ $@.tmp
erikje78df742012-06-07 20:40:50 -0700395 $(CD) $(JDK_OUTPUTDIR)/classes && \
ohair46fcac92012-09-18 11:29:24 -0700396 $(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
dholmes85dd5c82013-01-21 23:17:58 -0500397 @$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
ohair46fcac92012-09-18 11:29:24 -0700398 $(MV) $@.tmp $@
erikje78df742012-06-07 20:40:50 -0700399
erikje78df742012-06-07 20:40:50 -0700400##########################################################################################
401
erikjaf85fc42012-07-03 16:10:44 -0700402ifneq ($(OPENJDK_TARGET_OS), windows)
erikje78df742012-06-07 20:40:50 -0700403 CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
404 sun/awt/motif/X11GB2312\$$$$Decoder.class \
405 sun/awt/motif/X11GB2312.class \
406 sun/awt/motif/X11KSC5601\$$$$Decoder.class \
407 sun/awt/motif/X11KSC5601\$$$$Encoder.class \
408 sun/awt/motif/X11GB2312\$$$$Encoder.class \
409 sun/awt/motif/X11GBK\$$$$Encoder.class \
410 sun/awt/motif/X11KSC5601.class
411endif
412
ohairb71409c2012-10-26 14:23:29 -0700413$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,,\
erikje78df742012-06-07 20:40:50 -0700414 SRCS:=$(JDK_OUTPUTDIR)/classes, \
415 SUFFIXES:=.class .dat,\
416 INCLUDES:=sun/nio/cs/ext,\
417 EXTRA_FILES := sun/awt/HKSCS.class \
sherman7c202f42013-05-14 14:09:18 -0700418 $(CHARSETS_EXTRA_FILES), \
ohairb71409c2012-10-26 14:23:29 -0700419 JAR:=$(IMAGES_OUTPUTDIR)/lib/charsets.jar, \
erikjaf85fc42012-07-03 16:10:44 -0700420 SKIP_METAINF := true, \
421 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700422
erikje78df742012-06-07 20:40:50 -0700423##########################################################################################
424
ohairb71409c2012-10-26 14:23:29 -0700425ifndef OPENJDK
erikjaf85fc42012-07-03 16:10:44 -0700426ifeq ($(ENABLE_JFR), true)
erikje78df742012-06-07 20:40:50 -0700427 $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
428 SRCS:=$(JDK_OUTPUTDIR)/classes,\
429 INCLUDES:=com/oracle/jrockit/jfr \
430 oracle/jrockit/jfr,\
ohairb71409c2012-10-26 14:23:29 -0700431 JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
erikje78df742012-06-07 20:40:50 -0700432 SKIP_METAINF:=true,\
erikjaf85fc42012-07-03 16:10:44 -0700433 MANIFEST:=$(MAINMANIFEST), \
434 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700435
ohairb71409c2012-10-26 14:23:29 -0700436endif
erikje78df742012-06-07 20:40:50 -0700437endif
438
439##########################################################################################
440
441$(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
442 SRCS:=$(JDK_OUTPUTDIR)/classes,\
443 INCLUDES:=sun/security/provider/Sun.class \
444 sun/security/rsa/SunRsaSign.class \
445 sun/security/ssl \
446 com/sun/net/ssl/internal/ssl,\
ohairb71409c2012-10-26 14:23:29 -0700447 JAR:=$(IMAGES_OUTPUTDIR)/lib/jsse.jar,\
erikje78df742012-06-07 20:40:50 -0700448 SKIP_METAINF:=true,\
erikjaf85fc42012-07-03 16:10:44 -0700449 MANIFEST:=$(MAINMANIFEST), \
450 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700451
erikje78df742012-06-07 20:40:50 -0700452##########################################################################################
erikj5a79bc72012-11-28 14:10:00 +0100453# Create manifest for security jars
454
455#
456# Include these extra attributes for now, should probably take out.
457#
458JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
459$(JCE_MANIFEST): $(MAINMANIFEST)
460 $(MKDIR) -p $(@D)
461 $(RM) $@ $@.tmp
462 $(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#" \
463 -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
464 $(MAINMANIFEST) >> $@.tmp
465 $(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
466 $(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
467 $(MV) $@.tmp $@
468
469##########################################################################################
erikj2762cda2013-01-02 15:35:12 +0100470# For all security jars, always build the jar, but for closed, install the prebuilt signed
dholmes85dd5c82013-01-21 23:17:58 -0500471# version instead of the newly built jar. Unsigned jars are treated as intermediate targets
472# and explicitly added to the JARS list. For open, signing is not needed. See SignJars.gmk
erikj2762cda2013-01-02 15:35:12 +0100473# for more information.
erikje78df742012-06-07 20:40:50 -0700474
ohairb71409c2012-10-26 14:23:29 -0700475SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
erikj2762cda2013-01-02 15:35:12 +0100476SUNPKCS11_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunpkcs11.jar
erikje78df742012-06-07 20:40:50 -0700477
erikj2762cda2013-01-02 15:35:12 +0100478$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,,\
ohair46fcac92012-09-18 11:29:24 -0700479 SRCS:=$(JDK_OUTPUTDIR)/classes, \
480 SUFFIXES:=.class,\
481 INCLUDES:=sun/security/pkcs11,\
erikj2762cda2013-01-02 15:35:12 +0100482 JAR:=$(SUNPKCS11_JAR_UNSIGNED), \
erikj5a79bc72012-11-28 14:10:00 +0100483 MANIFEST:=$(JCE_MANIFEST), \
ohair46fcac92012-09-18 11:29:24 -0700484 SKIP_METAINF := true))
erikje78df742012-06-07 20:40:50 -0700485
erikj2762cda2013-01-02 15:35:12 +0100486$(SUNPKCS11_JAR_UNSIGNED): $(JCE_MANIFEST)
erikj5a79bc72012-11-28 14:10:00 +0100487
erikj2762cda2013-01-02 15:35:12 +0100488ifndef OPENJDK
489 SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
490 $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
491 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunPKCS11 provider..."
492 $(install-file)
493else
494 $(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_UNSIGNED)
495 $(install-file)
erikje78df742012-06-07 20:40:50 -0700496endif
497
dholmes85dd5c82013-01-21 23:17:58 -0500498JARS += $(SUNPKCS11_JAR_UNSIGNED)
ohair46fcac92012-09-18 11:29:24 -0700499
erikje78df742012-06-07 20:40:50 -0700500##########################################################################################
501
ohairb71409c2012-10-26 14:23:29 -0700502SUNEC_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunec.jar
erikj2762cda2013-01-02 15:35:12 +0100503SUNEC_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunec.jar
erikje78df742012-06-07 20:40:50 -0700504
erikj2762cda2013-01-02 15:35:12 +0100505$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
erikje78df742012-06-07 20:40:50 -0700506 SRCS:=$(JDK_OUTPUTDIR)/classes, \
507 SUFFIXES:=.class,\
508 INCLUDES:=sun/security/ec,\
erikj2762cda2013-01-02 15:35:12 +0100509 JAR:=$(SUNEC_JAR_UNSIGNED), \
erikj5a79bc72012-11-28 14:10:00 +0100510 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700511 SKIP_METAINF := true))
512
erikj2762cda2013-01-02 15:35:12 +0100513$(SUNEC_JAR_UNSIGNED): $(JCE_MANIFEST)
erikj5a79bc72012-11-28 14:10:00 +0100514
erikj2762cda2013-01-02 15:35:12 +0100515ifndef OPENJDK
516 SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
517 $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
518 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
519 $(install-file)
520else
521 $(SUNEC_JAR_DST) : $(SUNEC_JAR_UNSIGNED)
522 $(install-file)
erikje78df742012-06-07 20:40:50 -0700523endif
524
dholmes85dd5c82013-01-21 23:17:58 -0500525JARS += $(SUNEC_JAR_UNSIGNED)
erikje78df742012-06-07 20:40:50 -0700526
527##########################################################################################
528
529$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,,\
530 SRCS:=$(JDK_OUTPUTDIR)/classes,\
531 SUFFIXES:=BeanInfo.class .gif,\
532 INCLUDES:=javax/swing sun/swing,\
533 EXCLUDES:=javax/swing/plaf,\
534 EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
ohairb71409c2012-10-26 14:23:29 -0700535 JAR:=$(IMAGES_OUTPUTDIR)/lib/dt.jar,\
erikje78df742012-06-07 20:40:50 -0700536 SKIP_METAINF:=true))
537
erikje78df742012-06-07 20:40:50 -0700538##########################################################################################
539
ohairb71409c2012-10-26 14:23:29 -0700540SUNJCE_PROVIDER_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunjce_provider.jar
erikj2762cda2013-01-02 15:35:12 +0100541SUNJCE_PROVIDER_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunjce_provider.jar
erikje78df742012-06-07 20:40:50 -0700542
erikj2762cda2013-01-02 15:35:12 +0100543$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR,,\
erikje78df742012-06-07 20:40:50 -0700544 SRCS:=$(JDK_OUTPUTDIR)/classes, \
545 SUFFIXES:=.class,\
546 INCLUDES:= com/sun/crypto/provider,\
erikj2762cda2013-01-02 15:35:12 +0100547 JAR:=$(SUNJCE_PROVIDER_JAR_UNSIGNED), \
erikj5a79bc72012-11-28 14:10:00 +0100548 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700549 SKIP_METAINF := true))
erikj5a79bc72012-11-28 14:10:00 +0100550
erikj2762cda2013-01-02 15:35:12 +0100551$(SUNJCE_PROVIDER_JAR_UNSIGNED): $(JCE_MANIFEST)
erikje78df742012-06-07 20:40:50 -0700552
553ifndef OPENJDK
erikj2762cda2013-01-02 15:35:12 +0100554 SUNJCE_PROVIDER_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/sunjce_provider.jar
555 $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_SRC)
556 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunJCE provider..."
erikj62187db2012-12-05 10:12:57 +0100557 $(install-file)
erikje78df742012-06-07 20:40:50 -0700558else
erikj2762cda2013-01-02 15:35:12 +0100559 $(SUNJCE_PROVIDER_JAR_DST) : $(SUNJCE_PROVIDER_JAR_UNSIGNED)
560 $(install-file)
561endif
erikje78df742012-06-07 20:40:50 -0700562
dholmes85dd5c82013-01-21 23:17:58 -0500563JARS += $(SUNJCE_PROVIDER_JAR_UNSIGNED)
erikj2762cda2013-01-02 15:35:12 +0100564
565##########################################################################################
566
567JCE_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/jce.jar
568JCE_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/jce.jar
569
570$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
erikje78df742012-06-07 20:40:50 -0700571 SRCS:=$(JDK_OUTPUTDIR)/classes, \
572 SUFFIXES:=.class,\
573 INCLUDES:= javax/crypto sun/security/internal,\
erikj2762cda2013-01-02 15:35:12 +0100574 JAR:=$(JCE_JAR_UNSIGNED), \
erikj5a79bc72012-11-28 14:10:00 +0100575 MANIFEST:=$(JCE_MANIFEST), \
erikje78df742012-06-07 20:40:50 -0700576 SKIP_METAINF := true))
erikj5a79bc72012-11-28 14:10:00 +0100577
erikj2762cda2013-01-02 15:35:12 +0100578$(JCE_JAR_UNSIGNED): $(JCE_MANIFEST)
erikj5a79bc72012-11-28 14:10:00 +0100579
erikj2762cda2013-01-02 15:35:12 +0100580ifndef OPENJDK
581 JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
582 $(JCE_JAR_DST) : $(JCE_JAR_SRC)
583 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
584 $(install-file)
585else
586 $(JCE_JAR_DST) : $(JCE_JAR_UNSIGNED)
587 $(install-file)
erikje78df742012-06-07 20:40:50 -0700588endif
589
dholmes85dd5c82013-01-21 23:17:58 -0500590JARS += $(JCE_JAR_UNSIGNED)
erikje78df742012-06-07 20:40:50 -0700591
592##########################################################################################
593
ohairb71409c2012-10-26 14:23:29 -0700594US_EXPORT_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/US_export_policy.jar
erikj2762cda2013-01-02 15:35:12 +0100595US_EXPORT_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/US_export_policy.jar
erikje78df742012-06-07 20:40:50 -0700596
erikj2762cda2013-01-02 15:35:12 +0100597#
598# TODO fix so that SetupArchive does not write files into SRCS
599# then we don't need this extra copying
600#
601# NOTE: We currently do not place restrictions on our limited export
602# policy. This was not a typo.
603#
604US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
605US_EXPORT_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/US_export_policy_jar.tmp
erikje78df742012-06-07 20:40:50 -0700606
erikj2762cda2013-01-02 15:35:12 +0100607$(US_EXPORT_POLICY_JAR_TMP)/% : $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
erikj62187db2012-12-05 10:12:57 +0100608 $(install-file)
609
erikj2762cda2013-01-02 15:35:12 +0100610US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
erikj62187db2012-12-05 10:12:57 +0100611
erikj2762cda2013-01-02 15:35:12 +0100612$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR,$(US_EXPORT_POLICY_JAR_DEPS),\
erikje78df742012-06-07 20:40:50 -0700613 SRCS:=$(US_EXPORT_POLICY_JAR_TMP), \
614 SUFFIXES:= .policy,\
erikj2762cda2013-01-02 15:35:12 +0100615 JAR:=$(US_EXPORT_POLICY_JAR_UNSIGNED), \
erikje78df742012-06-07 20:40:50 -0700616 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
617 SKIP_METAINF := true))
618
erikj2762cda2013-01-02 15:35:12 +0100619ifndef OPENJDK
620 $(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
621 $(ECHO) $(LOG_INFO) Copying $(@F)
622 $(install-file)
623else
624 $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNSIGNED)
625 $(install-file)
erikje78df742012-06-07 20:40:50 -0700626endif
627
dholmes85dd5c82013-01-21 23:17:58 -0500628JARS += $(US_EXPORT_POLICY_JAR_UNSIGNED)
erikj62187db2012-12-05 10:12:57 +0100629
erikje78df742012-06-07 20:40:50 -0700630##########################################################################################
631
ohairb71409c2012-10-26 14:23:29 -0700632LOCAL_POLICY_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/security/local_policy.jar
erikj2762cda2013-01-02 15:35:12 +0100633LOCAL_POLICY_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/local_policy.jar
erikje78df742012-06-07 20:40:50 -0700634
erikj2762cda2013-01-02 15:35:12 +0100635#
636# TODO fix so that SetupArchive does not write files into SRCS
637# then we don't need this extra copying
638#
639LOCAL_POLICY_JAR_TMP := $(IMAGES_OUTPUTDIR)/local_policy_jar.tmp
erikj62187db2012-12-05 10:12:57 +0100640
erikj2762cda2013-01-02 15:35:12 +0100641ifeq ($(UNLIMITED_CRYPTO), true)
642 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/unlimited
643 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/default_local.policy
644 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: unlimited
erikjffb0d242012-10-29 13:55:47 -0700645else
erikj2762cda2013-01-02 15:35:12 +0100646 LOCAL_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/javax/crypto/policy/limited
647 LOCAL_POLICY_JAR_DEPS := $(LOCAL_POLICY_JAR_TMP)/exempt_local.policy \
648 $(LOCAL_POLICY_JAR_TMP)/default_local.policy
649 LOCAL_POLICY_JAR_ATTR := Crypto-Strength: limited
650endif
erikje78df742012-06-07 20:40:50 -0700651
erikj2762cda2013-01-02 15:35:12 +0100652$(LOCAL_POLICY_JAR_TMP)/% : $(LOCAL_POLICY_JAR_SRC_DIR)/%
erikj62187db2012-12-05 10:12:57 +0100653 $(install-file)
654
erikj2762cda2013-01-02 15:35:12 +0100655$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR,$(LOCAL_POLICY_JAR_DEPS),\
erikje78df742012-06-07 20:40:50 -0700656 SRCS:=$(LOCAL_POLICY_JAR_TMP),\
657 SUFFIXES:= .policy,\
erikj2762cda2013-01-02 15:35:12 +0100658 JAR:=$(LOCAL_POLICY_JAR_UNSIGNED), \
erikjffb0d242012-10-29 13:55:47 -0700659 EXTRA_MANIFEST_ATTR := $(LOCAL_POLICY_JAR_ATTR), \
erikje78df742012-06-07 20:40:50 -0700660 SKIP_METAINF := true))
661
erikj2762cda2013-01-02 15:35:12 +0100662ifndef OPENJDK
663 $(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
664 $(ECHO) $(LOG_INFO) Copying $(@F)
665 $(install-file)
666else
667 $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNSIGNED)
668 $(install-file)
erikje78df742012-06-07 20:40:50 -0700669endif
670
dholmes85dd5c82013-01-21 23:17:58 -0500671JARS += $(LOCAL_POLICY_JAR_UNSIGNED)
erikj62187db2012-12-05 10:12:57 +0100672
erikje78df742012-06-07 20:40:50 -0700673##########################################################################################
674
erikjaf85fc42012-07-03 16:10:44 -0700675ifeq ($(OPENJDK_TARGET_OS),windows)
erikje78df742012-06-07 20:40:50 -0700676
ohairb71409c2012-10-26 14:23:29 -0700677SUNMSCAPI_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
erikj2762cda2013-01-02 15:35:12 +0100678SUNMSCAPI_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/sunmscapi.jar
erikje78df742012-06-07 20:40:50 -0700679
ohairb71409c2012-10-26 14:23:29 -0700680$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR,,\
erikje78df742012-06-07 20:40:50 -0700681 SRCS:=$(JDK_OUTPUTDIR)/classes, \
682 SUFFIXES:=.class,\
683 INCLUDES:= sun/security/mscapi,\
erikj2762cda2013-01-02 15:35:12 +0100684 JAR:=$(SUNMSCAPI_JAR_UNSIGNED), \
erikj6d061182013-01-15 16:50:22 +0100685 MANIFEST:=$(JCE_MANIFEST), \
ohair46fcac92012-09-18 11:29:24 -0700686 SKIP_METAINF:=true))
erikj2762cda2013-01-02 15:35:12 +0100687
erikj6d061182013-01-15 16:50:22 +0100688$(SUNMSCAPI_JAR_UNSIGNED): $(JCE_MANIFEST)
689
erikj2762cda2013-01-02 15:35:12 +0100690ifndef OPENJDK
691 SUNMSCAPI_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/mscapi/sunmscapi.jar
692 $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_SRC)
693 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunMSCAPI provider..."
694 $(install-file)
695else
696 $(SUNMSCAPI_JAR_DST) : $(SUNMSCAPI_JAR_UNSIGNED)
697 $(install-file)
erikje78df742012-06-07 20:40:50 -0700698endif
699
dholmes85dd5c82013-01-21 23:17:58 -0500700JARS += $(SUNMSCAPI_JAR_UNSIGNED)
erikje78df742012-06-07 20:40:50 -0700701
702endif
703
704##########################################################################################
705
erikjaf85fc42012-07-03 16:10:44 -0700706ifeq ($(OPENJDK_TARGET_OS),solaris)
erikje78df742012-06-07 20:40:50 -0700707ifndef OPENJDK
708
ohairb71409c2012-10-26 14:23:29 -0700709UCRYPTO_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/ucrypto.jar
erikj2762cda2013-01-02 15:35:12 +0100710UCRYPTO_JAR_UNSIGNED := $(IMAGES_OUTPUTDIR)/unsigned/ucrypto.jar
erikje78df742012-06-07 20:40:50 -0700711UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
712
erikj2762cda2013-01-02 15:35:12 +0100713$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR,,\
714 SRCS:=$(JDK_OUTPUTDIR)/classes, \
715 SUFFIXES:=.class,\
716 INCLUDES:=com/oracle/security/ucrypto,\
717 JAR:=$(UCRYPTO_JAR_UNSIGNED), \
718 MANIFEST:=$(JCE_MANIFEST), \
719 SKIP_METAINF:=true))
720
721$(UCRYPTO_JAR_UNSIGNED): $(JCE_MANIFEST)
722
erikje78df742012-06-07 20:40:50 -0700723$(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC)
ohairb71409c2012-10-26 14:23:29 -0700724 @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..."
erikj62187db2012-12-05 10:12:57 +0100725 $(install-file)
erikje78df742012-06-07 20:40:50 -0700726
dholmes85dd5c82013-01-21 23:17:58 -0500727JARS += $(UCRYPTO_JAR_UNSIGNED)
erikje78df742012-06-07 20:40:50 -0700728
729endif
730endif
731
732##########################################################################################
733
naotoc378ffc2012-08-21 11:00:30 -0700734# Get the CLDRVERSION
735include GensrcCLDR.gmk
736
ohairb71409c2012-10-26 14:23:29 -0700737CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
naotoc378ffc2012-08-21 11:00:30 -0700738
ohairb71409c2012-10-26 14:23:29 -0700739$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR,,\
naotoc378ffc2012-08-21 11:00:30 -0700740 SRCS:=$(JDK_OUTPUTDIR)/classes,\
741 SUFFIXES:=.class,\
742 INCLUDES:=sun/text/resources/cldr \
743 sun/util/cldr \
744 sun/util/resources/cldr,\
745 EXCLUDES:=sun/util/cldr/CLDRLocaleProviderAdapter,\
746 JAR:=$(CLDRDATA_JAR_DST),\
747 EXTRA_MANIFEST_ATTR:=CLDR-Version: $(CLDRVERSION),\
748 SKIP_METAINF:=true))
749
naotoc378ffc2012-08-21 11:00:30 -0700750##########################################################################################
751
erikje78df742012-06-07 20:40:50 -0700752TOOLS_JAR_INCLUDES := \
erikjf08e4b12013-01-04 16:54:41 +0100753 com/sun/codemodel \
754 com/sun/istack/internal/tools \
755 com/sun/jarsigner \
erikje78df742012-06-07 20:40:50 -0700756 com/sun/javadoc \
757 com/sun/jdi \
erikje78df742012-06-07 20:40:50 -0700758 com/sun/source \
erikjf08e4b12013-01-04 16:54:41 +0100759 com/sun/tools/attach \
erikje78df742012-06-07 20:40:50 -0700760 com/sun/tools/classfile \
erikjf08e4b12013-01-04 16:54:41 +0100761 com/sun/tools/corba \
erikje78df742012-06-07 20:40:50 -0700762 com/sun/tools/doclets \
jjgcdd7cfd2012-12-17 10:31:27 -0800763 com/sun/tools/doclint \
erikje78df742012-06-07 20:40:50 -0700764 com/sun/tools/example/debug/expr \
765 com/sun/tools/example/debug/tty \
766 com/sun/tools/extcheck \
767 com/sun/tools/hat \
erikjf08e4b12013-01-04 16:54:41 +0100768 com/sun/tools/internal/jxc \
769 com/sun/tools/internal/jxc/ap \
770 com/sun/tools/internal/ws \
771 com/sun/tools/internal/ws/wscompile/plugin/at_generated \
772 com/sun/tools/internal/xjc \
erikje78df742012-06-07 20:40:50 -0700773 com/sun/tools/javac \
774 com/sun/tools/javadoc \
775 com/sun/tools/javah \
776 com/sun/tools/javap \
mchung98b6e502012-12-28 22:21:40 -0800777 com/sun/tools/jdeps \
erikjf08e4b12013-01-04 16:54:41 +0100778 com/sun/tools/jdi \
779 com/sun/tools/script/shell \
780 com/sun/xml/internal/dtdparser \
erikje78df742012-06-07 20:40:50 -0700781 com/sun/xml/internal/rngom \
782 com/sun/xml/internal/xsom \
783 org/relaxng/datatype \
erikjf08e4b12013-01-04 16:54:41 +0100784 sun/applet \
785 sun/jvmstat \
786 sun/rmi/rmic \
787 sun/security/tools/jarsigner \
788 sun/tools/asm \
erikje78df742012-06-07 20:40:50 -0700789 sun/tools/attach \
erikjf08e4b12013-01-04 16:54:41 +0100790 sun/tools/jar \
791 sun/tools/java \
792 sun/tools/javac \
793 sun/tools/jcmd \
erikje78df742012-06-07 20:40:50 -0700794 sun/tools/jinfo \
erikjf08e4b12013-01-04 16:54:41 +0100795 sun/tools/jmap \
796 sun/tools/jps \
797 sun/tools/jstack \
798 sun/tools/jstat \
799 sun/tools/jstatd \
800 sun/tools/native2ascii \
801 sun/tools/serialver \
802 sun/tools/tree \
803 sun/tools/util
erikje78df742012-06-07 20:40:50 -0700804
ohairb71409c2012-10-26 14:23:29 -0700805# The sjavac tools is not ready for public consumption.
806TOOLS_JAR_EXCLUDES=com/sun/tools/sjavac
807
808$(eval $(call SetupArchive,BUILD_TOOLS_JAR,,\
erikje78df742012-06-07 20:40:50 -0700809 SRCS:=$(JDK_OUTPUTDIR)/classes,\
810 SUFFIXES:=.class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
811 Tool aliasmap options,\
812 INCLUDES:=$(TOOLS_JAR_INCLUDES),\
ohairb71409c2012-10-26 14:23:29 -0700813 EXCLUDES:=$(TOOLS_JAR_EXCLUDES),\
erikje78df742012-06-07 20:40:50 -0700814 EXTRA_FILES:=META-INF/services/com.sun.jdi.connect.Connector \
815 META-INF/services/com.sun.jdi.connect.spi.TransportService \
816 META-INF/services/com.sun.tools.attach.spi.AttachProvider \
817 META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
818 META-INF/services/com.sun.tools.internal.xjc.Plugin,\
ohairb71409c2012-10-26 14:23:29 -0700819 JAR:=$(IMAGES_OUTPUTDIR)/lib/tools.jar,\
erikjaf85fc42012-07-03 16:10:44 -0700820 SKIP_METAINF:=true, \
821 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700822
erikje78df742012-06-07 20:40:50 -0700823
824##########################################################################################
825
ohair46fcac92012-09-18 11:29:24 -0700826include javadoc/CORE_PKGS.gmk
827include javadoc/NON_CORE_PKGS.gmk
erikje78df742012-06-07 20:40:50 -0700828
829# The compiler should not issue a "Proprietary" warning when compiling
830# classes in the com.sun.java.swing.plaf packages, since we've always
831# allowed, and even advocated, extending them (see bug 6476749).
832#
833# This approach is NOT to be used as a general purpose way to avoid such
834# compiler warnings for non-core packages. The correct way is to document
835# the packages in NON_CORE_PKGS.gmk, and include them in the NON_CORE_PKGS
836# definition.
837#
838# Swing has taken this approach only as a temporary measure to avoid
839# the compiler warnings until we can properly document these packages.
840# This is covered under 6491853.
841EXCLUDE_PROPWARN_PKGS = com.sun.java.swing.plaf.windows \
842 com.sun.java.swing.plaf.motif \
843 com.sun.java.swing.plaf.gtk
844
845#
846# Include the exported private packages in ct.sym.
847# This is an interim solution until the ct.sym is replaced
848# with a new module system (being discussed for JDK 8).
849#
mchung1bf93da2013-03-25 17:19:16 -0700850EXPORTED_PRIVATE_PKGS = com.oracle.net \
erikje78df742012-06-07 20:40:50 -0700851 com.oracle.nio
852
ohairb71409c2012-10-26 14:23:29 -0700853$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
ohair46fcac92012-09-18 11:29:24 -0700854 $(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
erikje78df742012-06-07 20:40:50 -0700855 $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
ohrstrom6cf9bfb2013-01-31 14:03:42 +0100856 $(JAVA) $(NEW_JAVAC) \
erikjdd218c02012-12-19 09:46:28 +0100857 -bootclasspath $(JDK_OUTPUTDIR)/classes \
erikje78df742012-06-07 20:40:50 -0700858 -XDprocess.packages -proc:only \
859 -processor com.sun.tools.javac.sym.CreateSymbols \
ohairb71409c2012-10-26 14:23:29 -0700860 -Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
erikje78df742012-06-07 20:40:50 -0700861 -Acom.sun.tools.javac.sym.Dest=$(IMAGES_OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
dholmes85dd5c82013-01-21 23:17:58 -0500862 -Acom.sun.tools.javac.sym.Profiles=profile-rtjar-includes.txt \
erikje78df742012-06-07 20:40:50 -0700863 $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS)
864 $(TOUCH) $@
865
erikj754c7442012-12-27 20:18:42 +0100866$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/symbols))
erikje78df742012-06-07 20:40:50 -0700867$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
868 SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
869 INCLUDES:=META-INF/sym,\
ohairb71409c2012-10-26 14:23:29 -0700870 JAR:=$(IMAGES_OUTPUTDIR)/lib/ct.sym, \
erikjaf85fc42012-07-03 16:10:44 -0700871 CHECK_COMPRESS_JAR:=true))
erikje78df742012-06-07 20:40:50 -0700872
erikje78df742012-06-07 20:40:50 -0700873
874##########################################################################################
875
876SRC_ZIP_INCLUDES = \
erikjf08e4b12013-01-04 16:54:41 +0100877 com/sun/corba \
878 com/sun/image/codec/jpeg \
879 com/sun/imageio \
880 com/sun/java_cup \
881 com/sun/javadoc \
882 com/sun/java/swing \
883 com/sun/jlex \
884 com/sun/jmx \
885 com/sun/naming \
886 com/sun/org/apache \
887 com/sun/security/auth \
888 com/sun/security/jgss \
889 com/sun/source \
erikje78df742012-06-07 20:40:50 -0700890 java/applet \
891 java/awt \
892 java/beans \
893 java/io \
894 java/lang \
895 java/math \
896 java/net \
897 java/nio \
898 java/rmi \
899 java/security \
900 java/sql \
901 java/text \
902 java/util \
erikje78df742012-06-07 20:40:50 -0700903 javax/accessibility \
904 javax/annotation \
erikje78df742012-06-07 20:40:50 -0700905 javax/imageio \
906 javax/lang \
907 javax/management \
908 javax/naming \
909 javax/print \
910 javax/rmi \
erikjf08e4b12013-01-04 16:54:41 +0100911 javax/script \
erikje78df742012-06-07 20:40:50 -0700912 javax/security \
913 javax/sound \
914 javax/sql \
915 javax/swing \
916 javax/tools \
917 javax/xml \
erikje78df742012-06-07 20:40:50 -0700918 org/ietf \
919 org/omg \
920 org/w3c/dom \
ohair46fcac92012-09-18 11:29:24 -0700921 org/xml/sax \
922 sunw
erikje78df742012-06-07 20:40:50 -0700923
ohair46fcac92012-09-18 11:29:24 -0700924SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
erikje78df742012-06-07 20:40:50 -0700925SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
926SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
927SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
928ifndef OPENJDK
929 SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
930endif
931
932# Need to copy launcher src files into desired directory structure
933# before zipping the sources.
934LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
ohair46fcac92012-09-18 11:29:24 -0700935 $(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
erikje78df742012-06-07 20:40:50 -0700936LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
ohair46fcac92012-09-18 11:29:24 -0700937 $(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
erikje78df742012-06-07 20:40:50 -0700938 $(LAUNCHER_SRC_FILES)))
939
940$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
erikj62187db2012-12-05 10:12:57 +0100941 $(install-file)
erikje78df742012-06-07 20:40:50 -0700942
ohair46fcac92012-09-18 11:29:24 -0700943$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
erikj62187db2012-12-05 10:12:57 +0100944 $(install-file)
erikje78df742012-06-07 20:40:50 -0700945
946$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
947
ohairb71409c2012-10-26 14:23:29 -0700948# This dir needs to exist before macro is evaluated to avoid warning from find.
949$(eval $(call MakeDir,$(IMAGES_OUTPUTDIR)/src))
erikje78df742012-06-07 20:40:50 -0700950$(eval $(call SetupZipArchive,BUILD_SRC_ZIP,\
951 SRC:=$(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src,\
952 INCLUDES:=$(SRC_ZIP_INCLUDES) launcher,\
ohairb71409c2012-10-26 14:23:29 -0700953 EXCLUDES:=javax/swing/beaninfo,\
erikje78df742012-06-07 20:40:50 -0700954 SUFFIXES:=.java .c .h,\
955 ZIP:=$(IMAGES_OUTPUTDIR)/src.zip,\
956 EXTRA_DEPS:=$(LAUNCHER_ZIP_SRC)))
957
erikje78df742012-06-07 20:40:50 -0700958##########################################################################################
959
raginip450da982013-01-18 11:33:31 -0800960ifndef OPENJDK
961ifeq ($(OPENJDK_TARGET_OS), windows)
962
963 $(eval $(call SetupArchive,BUILD_JACCESS_JAR,,\
964 SRCS:=$(JDK_OUTPUTDIR)/classes,\
965 INCLUDES:=com/sun/java/accessibility/util,\
966 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar,\
967 SKIP_METAINF:=true))
968
969 JARS += $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar
970
971 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
972 $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
973 SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit $(JDK_OUTPUTDIR)/classes,\
974 INCLUDES:=com/sun/java/accessibility,\
975 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
976 SKIP_METAINF:=true))
977
978 $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
979 SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy $(JDK_OUTPUTDIR)/classes,\
980 INCLUDES:=com/sun/java/accessibility,\
981 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
982 SKIP_METAINF:=true))
983
984 JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
985 $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
986 else
987 $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
988 SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit $(JDK_OUTPUTDIR)/classes,\
989 INCLUDES:=com/sun/java/accessibility,\
990 EXCLUDES:=com/sun/java/accessibility/util/java,\
991 JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
992 SKIP_METAINF:=true))
993
994 JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
995 endif
996endif
997endif
998
999##########################################################################################
1000
erikj62187db2012-12-05 10:12:57 +01001001#
1002# This is an empty jar (only contains manifest) and fits poorly into framework...
1003# create simple rule instead
1004#
1005$(IMAGES_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
1006 $(JAR) cfm $@ $<
1007
erikj62187db2012-12-05 10:12:57 +01001008##########################################################################################
1009
1010$(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/demo/nio/zipfs/zipfs.jar
1011 $(install-file)
1012
erikj62187db2012-12-05 10:12:57 +01001013##########################################################################################
1014
1015ifeq ($(OPENJDK_TARGET_OS),macosx)
1016 $(eval $(call SetupArchive,BUILD_JOBJC_JAR,,\
1017 SRCS:=$(JDK_OUTPUTDIR)/jobjc_classes,\
1018 JAR:=$(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
1019 JARINDEX:=true))
erikj62187db2012-12-05 10:12:57 +01001020endif
1021
1022##########################################################################################
1023
1024ifndef OPENJDK
1025 $(eval $(call SetupArchive,BUILD_ALT_RT_JAR,,\
1026 SRCS:=$(JDK_OUTPUTDIR)/altclasses_classes,\
1027 JAR:=$(IMAGES_OUTPUTDIR)/lib/alt-rt.jar))
1028
erikj62187db2012-12-05 10:12:57 +01001029endif
1030
1031##########################################################################################
1032
1033# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
1034# all jars can be found in one place when creating images in Images.gmk. It needs to be
1035# done here so that clean targets can be simple and accurate.
1036$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(JDK_OUTPUTDIR)/lib/sa-jdi.jar
1037 $(install-file)
1038
erikj62187db2012-12-05 10:12:57 +01001039##########################################################################################
erikjab5592c2013-01-04 17:09:10 +01001040#
erikj71bc88b2013-01-04 22:43:32 +01001041# sec-bin.zip is used by builds where the corresponding sources are not available
1042#
erikjab5592c2013-01-04 17:09:10 +01001043$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP,\
1044 SRC:=$(JDK_OUTPUTDIR),\
1045 INCLUDES:=classes/javax/net \
1046 classes/javax/security/cert \
1047 classes/com/sun/net/ssl \
1048 classes/com/sun/security/cert \
1049 classes/sun/net/www/protocol/https \
1050 classes/sun/security/pkcs12 \
1051 classes/sun/security/ssl \
1052 classes/sun/security/krb5 \
1053 classes/sun/security/krb5/internal \
1054 classes/sun/security/krb5/internal/ccache \
1055 classes/sun/security/krb5/internal/crypto \
1056 classes/sun/security/krb5/internal/ktab \
1057 classes/sun/security/krb5/internal/rcache \
1058 classes/sun/security/krb5/internal/util,\
1059 INCLUDE_FILES:=classes/sun/security/jgss/spi/GSSContextSpi.class,\
erikj71bc88b2013-01-04 22:43:32 +01001060 EXCLUDES:=classes/sun/security/krb5/internal/tools,\
erikjab5592c2013-01-04 17:09:10 +01001061 ZIP:=$(IMAGES_OUTPUTDIR)/sec-bin.zip))
1062
1063JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
1064
1065##########################################################################################
erikj71bc88b2013-01-04 22:43:32 +01001066#
1067# Windows specific binary security packages.
1068#
1069ifeq ($(OPENJDK_TARGET_OS),windows)
1070 # sec-windows-bin.zip is used by builds where the corresponding sources are not available
1071 $(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP,\
1072 SRC:=$(JDK_OUTPUTDIR),\
1073 INCLUDES:=classes/sun/security/krb5/internal/tools,\
1074 ZIP:=$(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
1075
1076 JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip
1077
1078 # JGSS files contain the native Kerberos library
1079 ifeq ($(OPENJDK_TARGET_CPU),x86_64)
1080 JGSS_ZIP_NAME=jgss-windows-x64-bin.zip
1081 else
1082 JGSS_ZIP_NAME=jgss-windows-i586-bin.zip
1083 endif
1084
1085 $(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP,\
1086 SRC:=$(JDK_OUTPUTDIR),\
1087 INCLUDE_FILES:=bin/w2k_lsa_auth.dll \
1088 bin/w2k_lsa_auth.map \
1089 bin/w2k_lsa_auth.pdb,\
1090 ZIP:=$(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
1091
1092 JARS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
1093endif
1094
1095##########################################################################################
erikj62187db2012-12-05 10:12:57 +01001096
jjgc30baea2013-02-25 15:08:11 -08001097# Import nashorn.jar from nashorn dist dir.
1098$(IMAGES_OUTPUTDIR)/lib/ext/nashorn.jar: $(NASHORN_DIST)/nashorn.jar
1099 $(install-file)
1100
jjgc30baea2013-02-25 15:08:11 -08001101##########################################################################################
1102
ohair46fcac92012-09-18 11:29:24 -07001103-include $(CUSTOM_MAKE_DIR)/CreateJars.gmk
1104
1105##########################################################################################
1106
erikje78df742012-06-07 20:40:50 -07001107all: $(JARS)
1108
1109.PHONY: default all