ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2011, 2012, 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 | # Setup the java compilers for the JDK build. |
| 33 | include Setup.gmk |
| 34 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 35 | JARS := |
| 36 | EXFILES := |
| 37 | EXCLUDES := |
| 38 | |
| 39 | ########################################################################################## |
| 40 | |
| 41 | EXCLUDES += com/sun/pept \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 42 | com/sun/tools/example/trace\ |
| 43 | com/sun/tools/example/debug/bdi\ |
| 44 | com/sun/tools/example/debug/event\ |
| 45 | com/sun/tools/example/debug/gui \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 46 | com/oracle/security |
| 47 | |
| 48 | ifdef OPENJDK |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 49 | EXCLUDES+= sun/dc \ |
| 50 | com/sun/jmx/snmp \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 51 | sun/management/snmp \ |
| 52 | com/sun/script |
| 53 | endif |
| 54 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 55 | ifndef OPENJDK |
| 56 | # There exists two versions of this file... |
| 57 | EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 58 | |
| 59 | ifeq ($(OPENJDK_TARGET_OS),windows) |
| 60 | # This gets built on unix platforms implicitly in the old build even though |
| 61 | # it's excluded in the closed build. |
| 62 | EXCLUDES+=sun/java2d/pisces |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 63 | |
| 64 | # AccessBridge is compiled separately below. |
| 65 | EXFILES += AccessBridge.java \ |
| 66 | com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java |
| 67 | # This seems to never be built |
| 68 | EXCLUDES += com/sun/java/accessibility/extensions |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 69 | endif |
| 70 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 71 | endif |
| 72 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 73 | ifneq ($(OPENJDK_TARGET_OS),solaris) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 74 | # Exclude Solaris nio and two security related files in src/share/classes |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 75 | EXFILES += SolarisAclFileAttributeView.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 76 | SolarisFileStore.java \ |
| 77 | SolarisFileSystem.java \ |
| 78 | SolarisFileSystemProvider.java \ |
| 79 | SolarisNativeDispatcher.java \ |
| 80 | SolarisUserDefinedFileAttributeView.java \ |
| 81 | SolarisWatchService.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 82 | SolarisAclFileAttributeView.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 83 | SolarisLoginModule.java \ |
| 84 | SolarisSystem.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 85 | sun/nio/ch/DevPollArrayWrapper.java \ |
| 86 | sun/nio/ch/DevPollSelectorImpl.java \ |
| 87 | sun/nio/ch/DevPollSelectorProvider.java \ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 88 | sun/nio/ch/EventPortSelectorImpl.java \ |
| 89 | sun/nio/ch/EventPortSelectorProvider.java \ |
| 90 | sun/nio/ch/EventPortWrapper.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 91 | sun/nio/ch/SolarisAsynchronousChannelProvider.java \ |
| 92 | sun/nio/ch/SolarisEventPort.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 93 | sun/tools/attach/SolarisAttachProvider.java \ |
| 94 | sun/tools/attach/SolarisVirtualMachine.java |
| 95 | endif |
| 96 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 97 | # In the old build, this isn't excluded on macosx, even though it probably |
| 98 | # should be. |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 99 | ifneq ($(OPENJDK_TARGET_OS),macosx) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 100 | EXFILES+=WrapperGenerator.java |
| 101 | endif |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 102 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 103 | ifneq ($(OPENJDK_TARGET_OS),windows) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 104 | # Exclude Window security related files in src/share/classes |
| 105 | EXFILES+=NTLoginModule.java \ |
| 106 | NTSystem.java |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 107 | else |
| 108 | EXFILES+=UnixLoginModule.java \ |
| 109 | UnixSystem.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 110 | endif |
| 111 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 112 | ifeq ($(OPENJDK_TARGET_OS),windows) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 113 | # Don't build GTK L&F on Windows |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 114 | EXCLUDES+=com/sun/java/swing/plaf/gtk |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 115 | endif |
| 116 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 117 | ifneq ($(OPENJDK_TARGET_OS),linux) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 118 | EXFILES+=sun/tools/attach/LinuxAttachProvider.java \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 119 | sun/tools/attach/LinuxVirtualMachine.java \ |
| 120 | sun/nio/ch/EPoll.java \ |
| 121 | sun/nio/ch/EPollArrayWrapper.java \ |
| 122 | sun/nio/ch/EPollPort.java \ |
| 123 | sun/nio/ch/EPollSelectorImpl.java \ |
| 124 | sun/nio/ch/EPollSelectorProvider.java \ |
| 125 | sun/nio/ch/LinuxAsynchronousChannelProvider.java \ |
| 126 | sun/nio/fs/LinuxDosFileAttributeView.java \ |
| 127 | sun/nio/fs/LinuxFileStore.java \ |
| 128 | sun/nio/fs/LinuxFileSystem.java \ |
| 129 | sun/nio/fs/LinuxFileSystemProvider.java \ |
| 130 | sun/nio/fs/LinuxNativeDispatcher.java \ |
| 131 | sun/nio/fs/LinuxUserDefinedFileAttributeView.java \ |
| 132 | sun/nio/fs/LinuxWatchService.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 133 | endif |
| 134 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 135 | ifneq ($(OPENJDK_TARGET_OS),macosx) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 136 | EXFILES+=sun/nio/ch/BsdAsynchronousChannelProvider.java \ |
| 137 | sun/nio/ch/KQueue.java \ |
| 138 | sun/nio/ch/KQueuePort.java \ |
| 139 | sun/nio/fs/BsdFileStore.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 140 | sun/nio/fs/BsdFileSystem.java \ |
| 141 | sun/nio/fs/BsdFileSystemProvider.java \ |
| 142 | sun/nio/fs/BsdNativeDispatcher.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 143 | sun/nio/fs/MacOSXFileSystemProvider.java \ |
| 144 | sun/nio/fs/MacOSXFileSystem.java \ |
| 145 | sun/nio/fs/MacOSXNativeDispatcher.java \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 146 | sun/tools/attach/BsdAttachProvider.java \ |
| 147 | sun/tools/attach/BsdVirtualMachine.java |
| 148 | endif |
| 149 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 150 | # Exclude BreakIterator classes that are just used in compile process to generate |
| 151 | # data files and shouldn't go in the product |
| 152 | EXFILES+=sun/text/resources/BreakIteratorRules.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 153 | sun/text/resources/BreakIteratorRules_th.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 154 | |
| 155 | # TODO: Add BUILD_HEADLESS_ONLY to configure? |
| 156 | ifdef BUILD_HEADLESS_ONLY |
| 157 | EXCLUDES+=sun/applet |
| 158 | endif |
| 159 | |
| 160 | ifdef OPENJDK |
| 161 | EXCLUDES+=sun/java2d/cmm/kcms |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 162 | endif |
| 163 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 164 | # Used on windows and macosx |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 165 | ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx)) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 166 | EXFILES+=sun/awt/AWTCharset.java |
| 167 | endif |
| 168 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 169 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 170 | EXFILES+=sun/awt/X11/ScreenFormat.java \ |
| 171 | sun/awt/X11/XArc.java \ |
| 172 | sun/awt/X11/XChar2b.java \ |
| 173 | sun/awt/X11/XCharStruct.java \ |
| 174 | sun/awt/X11/XClassHint.java \ |
| 175 | sun/awt/X11/XComposeStatus.java \ |
| 176 | sun/awt/X11/XExtCodes.java \ |
| 177 | sun/awt/X11/XFontProp.java \ |
| 178 | sun/awt/X11/XFontSetExtents.java \ |
| 179 | sun/awt/X11/XFontStruct.java \ |
| 180 | sun/awt/X11/XGCValues.java \ |
| 181 | sun/awt/X11/XHostAddress.java \ |
| 182 | sun/awt/X11/XIMCallback.java \ |
| 183 | sun/awt/X11/XIMHotKeyTrigger.java \ |
| 184 | sun/awt/X11/XIMHotKeyTriggers.java \ |
| 185 | sun/awt/X11/XIMPreeditCaretCallbackStruct.java \ |
| 186 | sun/awt/X11/XIMPreeditDrawCallbackStruct.java \ |
| 187 | sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \ |
| 188 | sun/awt/X11/XIMStatusDrawCallbackStruct.java \ |
| 189 | sun/awt/X11/XIMStringConversionCallbackStruct.java \ |
| 190 | sun/awt/X11/XIMStringConversionText.java \ |
| 191 | sun/awt/X11/XIMStyles.java \ |
| 192 | sun/awt/X11/XIMText.java \ |
| 193 | sun/awt/X11/XIMValuesList.java \ |
| 194 | sun/awt/X11/XImage.java \ |
| 195 | sun/awt/X11/XKeyboardControl.java \ |
| 196 | sun/awt/X11/XKeyboardState.java \ |
| 197 | sun/awt/X11/XOMCharSetList.java \ |
| 198 | sun/awt/X11/XOMFontInfo.java \ |
| 199 | sun/awt/X11/XOMOrientation.java \ |
| 200 | sun/awt/X11/XPoint.java \ |
| 201 | sun/awt/X11/XRectangle.java \ |
| 202 | sun/awt/X11/XSegment.java \ |
| 203 | sun/awt/X11/XStandardColormap.java \ |
| 204 | sun/awt/X11/XTextItem.java \ |
| 205 | sun/awt/X11/XTextItem16.java \ |
| 206 | sun/awt/X11/XTextProperty.java \ |
| 207 | sun/awt/X11/XTimeCoord.java \ |
| 208 | sun/awt/X11/XWindowChanges.java \ |
| 209 | sun/awt/X11/XdbeSwapInfo.java \ |
| 210 | sun/awt/X11/XmbTextItem.java \ |
| 211 | sun/awt/X11/XwcTextItem.java |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 212 | endif |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 213 | |
| 214 | # Exclude another implicitly not included file. |
| 215 | EXFILES+=sun/util/locale/AsciiUtil.java |
| 216 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 217 | ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 218 | # |
| 219 | # only solaris and macosx |
| 220 | # |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 221 | EXFILES+=sun/nio/fs/PollingWatchService.java |
| 222 | endif |
| 223 | |
| 224 | # TODO: Fix when converting NIO |
| 225 | # Exclude *-linux-arm.java and *-linux-ppc.java from closed. |
| 226 | EXFILES+=-linux-arm.java \ |
| 227 | -linux-ppc.java |
| 228 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 229 | # TODO: Is this necessary? |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 230 | ifeq ($(OPENJDK_TARGET_OS), windows) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 231 | EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \ |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 232 | sun/nio/ch/DevPollArrayWrapper.java \ |
| 233 | sun/nio/ch/DevPollSelectorImpl.java \ |
| 234 | sun/nio/ch/DevPollSelectorProvider.java \ |
| 235 | sun/nio/ch/InheritedChannel.java \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 236 | sun/nio/ch/PollSelectorProvider.java \ |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 237 | sun/nio/ch/PollSelectorImpl.java \ |
| 238 | sun/nio/ch/Port.java \ |
| 239 | sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \ |
| 240 | sun/nio/ch/SolarisAsynchronousChannelProvider.java \ |
| 241 | sun/nio/ch/SolarisEventPort.java \ |
| 242 | sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \ |
| 243 | sun/nio/ch/UnixAsynchronousSocketChannelImpl.java |
| 244 | EXFILES+=sun/net/sdp/SdpProvider.java |
| 245 | else |
| 246 | EXFILES+=sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 247 | endif |
| 248 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 249 | # Exclude nimbus files from rt.jar |
| 250 | EXFILES+=javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \ |
| 251 | javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \ |
| 252 | javax/swing/plaf/nimbus/ScrollBarPainter.java \ |
| 253 | javax/swing/plaf/nimbus/SliderPainter.java \ |
| 254 | javax/swing/plaf/nimbus/SpinnerPainter.java \ |
| 255 | javax/swing/plaf/nimbus/SplitPanePainter.java \ |
| 256 | javax/swing/plaf/nimbus/TabbedPanePainter.java |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 257 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 258 | # Acquire a list of files that should be copied straight over to the classes. |
| 259 | include CopyIntoClasses.gmk |
| 260 | # Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA |
| 261 | |
| 262 | ifndef OPENJDK |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 263 | CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \ |
| 264 | $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 265 | endif |
| 266 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 267 | MACOSX_SRC_DIRS := |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 268 | ifeq ($(OPENJDK_TARGET_OS),macosx) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 269 | MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes |
| 270 | |
| 271 | # this files are duplicated in MACOSX_SRC_DIRS |
| 272 | EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \ |
| 273 | $(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \ |
| 274 | $(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \ |
naoto | 09a6dec | 2012-08-24 10:13:58 -0700 | [diff] [blame] | 275 | $(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 276 | $(JDK_TOPDIR)/src/solaris/classes/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \ |
| 277 | $(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 278 | |
| 279 | # JObjC.jar contains 1.5 byte-code...so skip it here :-( |
| 280 | # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src |
| 281 | # EXCLUDES+= tests/java/com/apple/jobjc |
| 282 | |
| 283 | EXCLUDES+= com/apple/jobjc |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 284 | endif |
| 285 | |
| 286 | # The exception handling of swing beaninfo |
| 287 | # These resources violates the convention of having code and resources together under |
| 288 | # $(JDK_TOPDIR)/src/.../classes directories |
| 289 | $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/tools/swing-beans/beaninfo/images/%.gif |
| 290 | $(MKDIR) -p $(@D) |
| 291 | $(CP) $< $@ |
| 292 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 293 | # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying |
| 294 | # JDK_FILTER at the make command line, only a subset of the JDK java files will |
| 295 | # be recompiled. If multiple paths are separated by comma, convert that into a |
| 296 | # space separated list. |
| 297 | JDK_USER_DEFINED_FILTER:=$(strip $(subst $(COMMA),$(SPACE),$(JDK_FILTER))) |
| 298 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 299 | $(eval $(call SetupJavaCompilation,BUILD_JDK,\ |
| 300 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 301 | SRC:=$(JDK_TOPDIR)/src/share/classes \ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 302 | $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 303 | $(MACOSX_SRC_DIRS) \ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 304 | $(JDK_OUTPUTDIR)/gensrc \ |
| 305 | $(CLOSED_SRC_DIRS),\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 306 | INCLUDES:=$(JDK_USER_DEFINED_FILTER),\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 307 | EXCLUDES:=$(EXCLUDES),\ |
| 308 | EXCLUDE_FILES:=$(EXFILES),\ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 309 | BIN:=$(JDK_OUTPUTDIR)/classes,\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 310 | COPY:=$(COPY_PATTERNS),\ |
| 311 | COPY_FILES:=$(COPY_FILES),\ |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 312 | HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers)) |
| 313 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 314 | ########################################################################################## |
| 315 | # Special handling of header file generation for classes in the jigsaw base module which |
| 316 | # currently can't add the annotaion GenerateNativeHeaders. For these specific classes the |
| 317 | # java file and the class have the same names which enables shortcutting the dependencies. |
| 318 | |
| 319 | JDK_BASE_HEADER_CLASSES:=java.lang.Integer \ |
| 320 | java.lang.Long \ |
| 321 | java.net.SocketOptions \ |
dxu | ad61719 | 2012-10-26 11:21:02 +0100 | [diff] [blame] | 322 | sun.nio.ch.IOStatus \ |
| 323 | java.io.FileSystem |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 324 | |
| 325 | JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\ |
| 326 | $(subst .,/,$(JDK_BASE_HEADER_CLASSES))) |
| 327 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 328 | ifeq ($(OPENJDK_TARGET_OS),windows) |
erikj | 262993d | 2012-06-11 09:30:04 -0700 | [diff] [blame] | 329 | JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 330 | JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS) |
| 331 | JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\ |
| 332 | $(subst .,/,$(JDK_BASE_HEADER_CLASSES_WINDOWS))) |
| 333 | endif |
| 334 | |
| 335 | # Set prereqs to the java files since make doesn't know about the class files. Add BUILD_JDK |
| 336 | # as an order only dependency to avoid race with the java compilation. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 337 | $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers: $(JDK_BASE_HEADER_JAVA_FILES) | $(BUILD_JDK) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 338 | $(ECHO) Generating headers for jdk base classes |
| 339 | $(JAVAH) -bootclasspath $(JDK_OUTPUTDIR)/classes -d $(JDK_OUTPUTDIR)/gensrc_headers \ |
| 340 | $(JDK_BASE_HEADER_CLASSES) |
| 341 | $(TOUCH) $@ |
| 342 | |
| 343 | ########################################################################################## |
| 344 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 345 | # |
| 346 | # This is an empty jar (only contains manifest) and fits poorly into framework... |
| 347 | # create simple rule instead |
| 348 | # |
| 349 | MANAGEMENT_AGENT_JAR_DEPS := $(JDK_TOPDIR)/src/share/classes/sun/management/manifest |
| 350 | |
| 351 | $(JDK_OUTPUTDIR)/lib/management-agent.jar : $(JDK_TOPDIR)/src/share/classes/sun/management/manifest |
| 352 | $(JAR) cfm $@ $(JDK_TOPDIR)/src/share/classes/sun/management/manifest |
| 353 | |
| 354 | JARS += $(JDK_OUTPUTDIR)/lib/management-agent.jar |
| 355 | |
| 356 | ########################################################################################## |
| 357 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 358 | ifndef OPENJDK |
| 359 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 360 | $(eval $(call SetupJavaCompilation,BUILD_ALTCLASSES_JAR,\ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 361 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 362 | SRC:=$(JDK_TOPDIR)/src/closed/share/altclasses, \ |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 363 | BIN:=$(JDK_OUTPUTDIR)/altclasses_classes,\ |
| 364 | JAR:=$(JDK_OUTPUTDIR)/lib/alt-rt.jar)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 365 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 366 | $(BUILD_ALTCLASSES_JAR): $(BUILD_JDK) |
| 367 | JARS += $(JDK_OUTPUTDIR)/lib/alt-rt.jar |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 368 | |
| 369 | endif |
| 370 | |
| 371 | ########################################################################################## |
| 372 | |
| 373 | $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin: |
| 374 | $(MKDIR) -p $(@D) |
| 375 | $(TOUCH) $@ |
| 376 | |
| 377 | ########################################################################################## |
| 378 | |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 379 | ifeq ($(OPENJDK_TARGET_OS),macosx) |
| 380 | # |
| 381 | # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag. |
| 382 | # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-( |
| 383 | # |
| 384 | $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\ |
| 385 | JAVAC:=$(JAVAC),\ |
| 386 | FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 387 | SERVER_DIR:=$(SJAVAC_SERVER_DIR),\ |
| 388 | SERVER_JVM:=$(SJAVAC_SERVER_JAVA))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 389 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 390 | $(eval $(call SetupJavaCompilation,BUILD_JOBJC_JAR,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 391 | SETUP:=GENERATE_15BYTECODE,\ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 392 | DISABLE_SJAVAC:=true,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 393 | SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ |
| 394 | $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ |
| 395 | $(JDK_OUTPUTDIR)/gensrc, \ |
| 396 | INCLUDES := com/apple/jobjc,\ |
| 397 | EXCLUDES := tests/java/com/apple/jobjc,\ |
| 398 | BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\ |
| 399 | JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \ |
| 400 | JARINDEX := true)) |
| 401 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 402 | $(BUILD_JOBJC_JAR) : $(BUILD_JDK) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 403 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 404 | JARS += $(JDK_OUTPUTDIR)/lib/JObjC.jar |
| 405 | |
| 406 | $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS_JAR,\ |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 407 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 408 | SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \ |
| 409 | $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \ |
| 410 | $(JDK_OUTPUTDIR)/gensrc, \ |
| 411 | INCLUDES := com/apple/jobjc,\ |
| 412 | EXCLUDES := tests/java/com/apple/jobjc,\ |
| 413 | BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\ |
erikj | 4f66f2d | 2012-11-03 16:27:01 -0700 | [diff] [blame] | 414 | HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers_jobjc)) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 415 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 416 | $(BUILD_JOBJC_HEADERS_JAR) : $(BUILD_JDK) |
| 417 | |
| 418 | JARS += $(BUILD_JOBJC_HEADERS_JAR) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 419 | |
| 420 | endif |
| 421 | |
| 422 | ########################################################################################## |
| 423 | |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 424 | ifndef OPENJDK |
| 425 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 426 | ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
| 427 | $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32,\ |
| 428 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 429 | JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\ |
| 430 | SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/32bit,\ |
| 431 | BIN:=$(JDK_OUTPUTDIR)/classes_ab/32bit)) |
| 432 | |
| 433 | $(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK) |
| 434 | |
| 435 | $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY,\ |
| 436 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 437 | JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\ |
| 438 | SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/legacy,\ |
| 439 | BIN:=$(JDK_OUTPUTDIR)/classes_ab/legacy)) |
| 440 | |
| 441 | $(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK) |
| 442 | |
| 443 | else |
| 444 | |
| 445 | $(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64,\ |
| 446 | SETUP:=GENERATE_JDKBYTECODE,\ |
| 447 | JAVAC_FLAGS:=-cp $(JDK_OUTPUTDIR)/classes,\ |
| 448 | SRC:=$(JDK_OUTPUTDIR)/gensrc_ab/64bit,\ |
| 449 | BIN:=$(JDK_OUTPUTDIR)/classes_ab/64bit)) |
| 450 | |
| 451 | $(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK) |
| 452 | |
| 453 | endif |
| 454 | endif |
| 455 | endif |
| 456 | |
| 457 | ########################################################################################## |
| 458 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 459 | # copy with -a to preserve timestamps so dependencies down the line aren't messed up |
raginip | 450da98 | 2013-01-18 11:33:31 -0800 | [diff] [blame] | 460 | all: $(BUILD_JDK) $(JARS) $(COPY_EXTRA) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \ |
| 461 | $(JDK_OUTPUTDIR)/gensrc_headers/_the.jdk.base.headers \ |
| 462 | $(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \ |
| 463 | $(BUILD_ACCESSBRIDGE_LEGACY) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 464 | |
| 465 | .PHONY: all |