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