Makefile 31.0 KB
Newer Older
D
duke 已提交
1
#
2
# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
D
duke 已提交
3 4 5 6
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
D
duke 已提交
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
D
duke 已提交
10 11 12 13 14 15 16 17 18 19 20
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
21 22 23
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
D
duke 已提交
24 25 26 27 28 29 30 31 32 33
#

#
# Makefile for java.nio
#

BUILDDIR = ../..
PACKAGE = java.nio
LIBRARY = nio
PRODUCT = java
34 35
JAVAC_MAX_WARNINGS = true
JAVAC_WARNINGS_FATAL = true
D
duke 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
include $(BUILDDIR)/common/Defs.gmk

NIO_SRC = $(SHARE_SRC)/classes/java/nio
NIO_GEN = $(GENSRCDIR)/java/nio

SNIO_SRC = $(SHARE_SRC)/classes/sun/nio
SNIO_GEN = $(GENSRCDIR)/sun/nio

#
# Files to compile
#

include FILES_java.gmk
include FILES_c.gmk
include Exportedfiles.gmk

ifeq ($(PLATFORM), solaris)
FILES_java += \
        sun/nio/ch/AbstractPollSelectorImpl.java \
	sun/nio/ch/DevPollArrayWrapper.java \
	sun/nio/ch/DevPollSelectorImpl.java \
        sun/nio/ch/DevPollSelectorProvider.java \
	sun/nio/ch/InheritedChannel.java \
        sun/nio/ch/PollSelectorProvider.java \
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
        sun/nio/ch/PollSelectorImpl.java \
	sun/nio/ch/Port.java \
	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
	sun/nio/ch/SolarisAsynchronousChannelProvider.java \
	sun/nio/ch/SolarisEventPort.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/PollingWatchService.java \
	sun/nio/fs/SolarisAclFileAttributeView.java \
	sun/nio/fs/SolarisFileStore.java \
	sun/nio/fs/SolarisFileSystem.java \
	sun/nio/fs/SolarisFileSystemProvider.java \
	sun/nio/fs/SolarisUserDefinedFileAttributeView.java \
	sun/nio/fs/SolarisNativeDispatcher.java \
	sun/nio/fs/SolarisWatchService.java \
	sun/nio/fs/UnixChannelFactory.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixDirectoryStream.java \
	sun/nio/fs/UnixException.java \
	sun/nio/fs/UnixFileAttributeViews.java \
	sun/nio/fs/UnixFileAttributes.java \
	sun/nio/fs/UnixFileKey.java \
	sun/nio/fs/UnixFileModeAttribute.java \
	sun/nio/fs/UnixFileStore.java \
	sun/nio/fs/UnixFileStoreAttributes.java \
	sun/nio/fs/UnixFileSystem.java \
	sun/nio/fs/UnixFileSystemProvider.java \
	sun/nio/fs/UnixMountEntry.java \
	sun/nio/fs/UnixNativeDispatcher.java \
	sun/nio/fs/UnixPath.java \
	sun/nio/fs/UnixSecureDirectoryStream.java \
	sun/nio/fs/UnixUriUtils.java \
	sun/nio/fs/UnixUserPrincipals.java
D
duke 已提交
95 96 97 98

FILES_c += \
        DevPollArrayWrapper.c \
	InheritedChannel.c \
99
	NativeThread.c \
100 101 102 103 104 105 106 107 108 109
        PollArrayWrapper.c \
	SolarisEventPort.c \
	UnixAsynchronousServerSocketChannelImpl.c \
	UnixAsynchronousSocketChannelImpl.c \
	\
	GnomeFileTypeDetector.c \
	SolarisNativeDispatcher.c \
	SolarisWatchService.c \
	UnixCopyFile.c \
	UnixNativeDispatcher.c
D
duke 已提交
110 111 112 113

FILES_export += \
	sun/nio/ch/DevPollArrayWrapper.java \
	sun/nio/ch/InheritedChannel.java \
114 115 116 117 118 119 120 121 122 123 124 125 126 127
	sun/nio/ch/NativeThread.java \
	sun/nio/ch/SolarisEventPort.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/SolarisNativeDispatcher.java \
	sun/nio/fs/SolarisWatchService.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixNativeDispatcher.java

FILES_gen += \
	sun/nio/fs/SolarisConstants.java \
	sun/nio/fs/UnixConstants.java
D
duke 已提交
128 129 130 131
endif # PLATFORM = solaris

ifeq ($(PLATFORM), windows)
FILES_java += \
132 133 134 135 136 137
	sun/nio/ch/Iocp.java \
	sun/nio/ch/PendingIoCache.java \
	sun/nio/ch/WindowsAsynchronousChannelProvider.java \
	sun/nio/ch/WindowsAsynchronousFileChannelImpl.java \
	sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java \
D
duke 已提交
138
        sun/nio/ch/WindowsSelectorImpl.java \
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
        sun/nio/ch/WindowsSelectorProvider.java \
	\
	sun/nio/fs/RegistryFileTypeDetector.java \
	sun/nio/fs/WindowsAclFileAttributeView.java \
	sun/nio/fs/WindowsChannelFactory.java \
	sun/nio/fs/WindowsConstants.java \
	sun/nio/fs/WindowsDirectoryStream.java \
	sun/nio/fs/WindowsException.java \
	sun/nio/fs/WindowsFileAttributeViews.java \
	sun/nio/fs/WindowsFileAttributes.java \
	sun/nio/fs/WindowsFileCopy.java \
	sun/nio/fs/WindowsFileStore.java \
	sun/nio/fs/WindowsFileSystem.java \
	sun/nio/fs/WindowsFileSystemProvider.java \
	sun/nio/fs/WindowsLinkSupport.java \
	sun/nio/fs/WindowsUserDefinedFileAttributeView.java \
	sun/nio/fs/WindowsNativeDispatcher.java \
	sun/nio/fs/WindowsPath.java \
	sun/nio/fs/WindowsPathParser.java \
	sun/nio/fs/WindowsPathType.java \
	sun/nio/fs/WindowsSecurity.java \
	sun/nio/fs/WindowsSecurityDescriptor.java \
	sun/nio/fs/WindowsUriSupport.java \
	sun/nio/fs/WindowsUserPrincipals.java \
	sun/nio/fs/WindowsWatchService.java
D
duke 已提交
164 165

FILES_c += \
166 167 168 169 170 171
	Iocp.c \
	RegistryFileTypeDetector.c \
	WindowsAsynchronousFileChannelImpl.c \
	WindowsAsynchronousServerSocketChannelImpl.c \
	WindowsAsynchronousSocketChannelImpl.c \
	WindowsNativeDispatcher.c \
D
duke 已提交
172 173 174
        WindowsSelectorImpl.c

FILES_export += \
175 176 177 178 179 180 181
	sun/nio/ch/Iocp.java \
	sun/nio/ch/WindowsAsynchronousFileChannelImpl.java \
	sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java \
	sun/nio/ch/WindowsSelectorImpl.java \
	sun/nio/fs/WindowsNativeDispatcher.java \
	sun/nio/fs/RegistryFileTypeDetector.java
D
duke 已提交
182 183 184 185 186
endif # PLATFORM = windows

ifeq ($(PLATFORM), linux)
FILES_java += \
        sun/nio/ch/AbstractPollSelectorImpl.java \
187
	sun/nio/ch/EPoll.java \
D
duke 已提交
188
	sun/nio/ch/EPollArrayWrapper.java \
189
	sun/nio/ch/EPollPort.java \
D
duke 已提交
190 191 192
	sun/nio/ch/EPollSelectorProvider.java \
	sun/nio/ch/EPollSelectorImpl.java \
	sun/nio/ch/InheritedChannel.java \
193
	sun/nio/ch/LinuxAsynchronousChannelProvider.java \
D
duke 已提交
194
        sun/nio/ch/PollSelectorProvider.java \
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
        sun/nio/ch/PollSelectorImpl.java \
	sun/nio/ch/Port.java \
	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/LinuxDosFileAttributeView.java \
	sun/nio/fs/LinuxFileStore.java \
	sun/nio/fs/LinuxFileSystem.java \
	sun/nio/fs/LinuxFileSystemProvider.java \
	sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
	sun/nio/fs/LinuxNativeDispatcher.java \
	sun/nio/fs/LinuxWatchService.java \
	sun/nio/fs/UnixChannelFactory.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixDirectoryStream.java \
	sun/nio/fs/UnixException.java \
	sun/nio/fs/UnixFileAttributeViews.java \
	sun/nio/fs/UnixFileAttributes.java \
	sun/nio/fs/UnixFileKey.java \
	sun/nio/fs/UnixFileModeAttribute.java \
	sun/nio/fs/UnixFileStore.java \
	sun/nio/fs/UnixFileStoreAttributes.java \
	sun/nio/fs/UnixFileSystem.java \
	sun/nio/fs/UnixFileSystemProvider.java \
	sun/nio/fs/UnixMountEntry.java \
	sun/nio/fs/UnixNativeDispatcher.java \
	sun/nio/fs/UnixPath.java \
	sun/nio/fs/UnixSecureDirectoryStream.java \
	sun/nio/fs/UnixUriUtils.java \
	sun/nio/fs/UnixUserPrincipals.java
D
duke 已提交
227 228

FILES_c += \
229
	EPoll.c \
D
duke 已提交
230
	EPollArrayWrapper.c \
231
	EPollPort.c \
D
duke 已提交
232
	InheritedChannel.c \
233
	NativeThread.c \
234 235 236 237 238 239 240 241 242
        PollArrayWrapper.c \
	UnixAsynchronousServerSocketChannelImpl.c \
	UnixAsynchronousSocketChannelImpl.c \
	\
	GnomeFileTypeDetector.c \
	LinuxNativeDispatcher.c \
	LinuxWatchService.c \
	UnixCopyFile.c \
	UnixNativeDispatcher.c
D
duke 已提交
243 244

FILES_export += \
245
	sun/nio/ch/EPoll.java \
D
duke 已提交
246
        sun/nio/ch/EPollArrayWrapper.java \
247
	sun/nio/ch/EPollPort.java \
D
duke 已提交
248
	sun/nio/ch/InheritedChannel.java \
249 250 251 252 253 254 255 256 257
	sun/nio/ch/NativeThread.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/LinuxNativeDispatcher.java \
	sun/nio/fs/LinuxWatchService.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixNativeDispatcher.java
258

259 260
FILES_gen += \
	sun/nio/fs/UnixConstants.java
D
duke 已提交
261 262
endif # PLATFORM = linux

263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
ifeq ($(PLATFORM), macosx)
FILES_java += \
        sun/nio/ch/AbstractPollSelectorImpl.java \
	sun/nio/ch/BsdAsynchronousChannelProvider.java \
	sun/nio/ch/InheritedChannel.java \
	sun/nio/ch/KQueue.java \
	sun/nio/ch/KQueuePort.java \
        sun/nio/ch/PollSelectorProvider.java \
        sun/nio/ch/PollSelectorImpl.java \
	sun/nio/ch/Port.java \
	sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/BsdFileStore.java \
	sun/nio/fs/BsdFileSystem.java \
	sun/nio/fs/BsdFileSystemProvider.java \
	sun/nio/fs/BsdNativeDispatcher.java \
	sun/nio/fs/PollingWatchService.java \
	sun/nio/fs/UnixChannelFactory.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixDirectoryStream.java \
	sun/nio/fs/UnixException.java \
	sun/nio/fs/UnixFileAttributeViews.java \
	sun/nio/fs/UnixFileAttributes.java \
	sun/nio/fs/UnixFileKey.java \
	sun/nio/fs/UnixFileModeAttribute.java \
	sun/nio/fs/UnixFileStore.java \
	sun/nio/fs/UnixFileStoreAttributes.java \
	sun/nio/fs/UnixFileSystem.java \
	sun/nio/fs/UnixFileSystemProvider.java \
	sun/nio/fs/UnixMountEntry.java \
	sun/nio/fs/UnixNativeDispatcher.java \
	sun/nio/fs/UnixPath.java \
	sun/nio/fs/UnixSecureDirectoryStream.java \
	sun/nio/fs/UnixUriUtils.java \
	sun/nio/fs/UnixUserPrincipals.java

FILES_c += \
	InheritedChannel.c \
	NativeThread.c \
        PollArrayWrapper.c \
	UnixAsynchronousServerSocketChannelImpl.c \
	UnixAsynchronousSocketChannelImpl.c \
	\
	GnomeFileTypeDetector.c \
	BsdNativeDispatcher.c \
	UnixCopyFile.c \
	UnixNativeDispatcher.c \
	\
	KQueue.c \
	KQueuePort.c

FILES_export += \
	sun/nio/ch/InheritedChannel.java \
	sun/nio/ch/KQueue.java \
	sun/nio/ch/KQueuePort.java \
	sun/nio/ch/NativeThread.java \
	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
	sun/nio/ch/UnixAsynchronousSocketChannelImpl.java \
	\
	sun/nio/fs/GnomeFileTypeDetector.java \
	sun/nio/fs/BsdNativeDispatcher.java \
	sun/nio/fs/UnixCopyFile.java \
	sun/nio/fs/UnixNativeDispatcher.java
	
FILES_gen += \
	sun/nio/fs/UnixConstants.java
endif # PLATFORM = bsd, macosx

ifeq ($(PLATFORM), macosx)
FILES_java += \
    sun/nio/ch/KQueueSelectorProvider.java \
    sun/nio/ch/KQueueSelectorImpl.java \
    sun/nio/ch/KQueueArrayWrapper.java

FILES_c += \
    KQueueArrayWrapper.c

vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs)
vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch)

else

348
#
D
duke 已提交
349 350
# Find platform-specific C source files
#
351
vpath %.c $(PLATFORM_SRC)/native/sun/nio/fs
D
duke 已提交
352 353 354
vpath %.c $(PLATFORM_SRC)/native/sun/nio/ch
vpath %.c $(SHARE_SRC)/native/sun/nio/ch

355 356
endif # PLATFORM = macosx

D
duke 已提交
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
#
# Various variables
#

JAVALIB = 		# Don't self-link

#
# Access to io_util.c and net_util.c
#

OTHER_INCLUDES += \
  -I$(SHARE_SRC)/native/sun/nio/ch \
  -I$(SHARE_SRC)/native/java/io \
  -I$(SHARE_SRC)/native/java/net \
  -I$(PLATFORM_SRC)/native/java/net \
  -I$(CLASSHDRDIR)/../../../java.lang/java/CClassHeaders

ifeq ($(PLATFORM),windows)
  OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \
     -libpath:$(LIBDIR) java.lib \
     $(OBJDIR)/../../../../sun/java.net/net/$(OBJDIRNAME)/net.lib \
     $(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/io_util.obj \
     $(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/FileDescriptor_md.obj
endif
ifeq ($(PLATFORM), linux)
382 383 384 385
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
endif
ifeq ($(PLATFORM), macosx)
OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
D
duke 已提交
386 387
endif
ifeq ($(PLATFORM), solaris)
388
OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
D
duke 已提交
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
		-L$(LIBDIR)/$(LIBARCH) -ljava -lnet
endif # PLATFORM

#
# Rules
#

build: sources

clean clobber::
	$(RM) -r $(NIO_GEN) $(SNIO_GEN)
	$(RM) -r $(CLASSDESTDIR)/java/nio
	$(RM) -r $(CLASSDESTDIR)/sun/nio

ifeq ($(PLATFORM), solaris)
FILES_m = mapfile-solaris
endif
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
409 410 411
ifeq ($(PLATFORM), macosx)
FILES_m = mapfile-bsd
endif
D
duke 已提交
412 413 414 415 416 417 418
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk

#
# Generate source files
#

419 420
SPP_JARFILE = $(BUILDTOOLJARDIR)/spp.jar
SPP_CMD = $(BOOT_JAVA_CMD) -jar $(SPP_JARFILE)
D
duke 已提交
421 422 423 424 425 426 427 428

FILES_genout = $(FILES_gen:%.java=$(GENSRCDIR)/%.java)

BUF_SRC=$(NIO_SRC)
CH_SRC=$(NIO_SRC)/channels
CS_SRC=$(NIO_SRC)/charset
SCH_SRC=$(SNIO_SRC)/ch
SCS_SRC=$(SNIO_SRC)/cs
429
SFS_SRC=$(SNIO_SRC)/fs
D
duke 已提交
430

431 432 433 434 435 436 437 438 439
# Template files
HEAP_X_BUF_TEMPLATE=$(BUF_SRC)/Heap-X-Buffer.java.template
BYTE_X_BUF_TEMPLATE=$(BUF_SRC)/ByteBufferAs-X-Buffer.java.template
X_BUF_TEMPLATE=$(BUF_SRC)/X-Buffer.java.template
X_BUF_BIN_TEMPLATE=$(BUF_SRC)/X-Buffer-bin.java.template
DIRECT_X_BUF_TEMPLATE=$(BUF_SRC)/Direct-X-Buffer.java.template
DIRECT_X_BUF_BIN_TEMPLATE=$(BUF_SRC)/Direct-X-Buffer-bin.java.template
CHARSET_X_CODER_TEMPLATE=$(CS_SRC)/Charset-X-Coder.java.template

D
duke 已提交
440 441 442 443 444
BUF_GEN=$(NIO_GEN)
CH_GEN=$(NIO_GEN)/channels
CS_GEN=$(NIO_GEN)/charset
SCH_GEN=$(SNIO_GEN)/ch
SCS_GEN=$(SNIO_GEN)/cs
445
SFS_GEN=$(SNIO_GEN)/fs
D
duke 已提交
446

447 448 449
FILES_gensbcs_out = $(FILES_gen_sbcs:%.java=$(GENSRCDIR)/%.java)

sources: $(SPP_JARFILE) $(FILES_genout) $(FILES_gensbcs_out)
D
duke 已提交
450 451 452 453 454 455 456

#
# Generated buffer classes
#

GEN_BUFFER_SH = genBuffer.sh

457
GEN_BUFFER_CMD = SPP="$(SPP_CMD)" NAWK="$(NAWK)" SED="$(SED)" SH="$(SH)" \
D
duke 已提交
458 459 460 461
                 $(SH) $(GEN_BUFFER_SH)

# Public abstract buffer classes
#
462 463
$(BUF_GEN)/ByteBuffer.java: $(X_BUF_TEMPLATE) \
			    $(X_BUF_BIN_TEMPLATE) \
D
duke 已提交
464 465 466 467 468
			    $(GEN_BUFFER_SH)
	$(prep-target)
	@$(RM) $@.temp
	TYPE=byte BIN=1 SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
469
$(BUF_GEN)/CharBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
470 471 472 473
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
474
$(BUF_GEN)/ShortBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
475 476 477 478
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
479
$(BUF_GEN)/IntBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
480 481 482 483
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
484
$(BUF_GEN)/LongBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
485 486 487 488
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
489
$(BUF_GEN)/FloatBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
490 491 492 493
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
494
$(BUF_GEN)/DoubleBuffer.java: $(X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
495 496 497 498 499 500 501
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Buffers whose contents are heap-allocated
# 
502
$(BUF_GEN)/HeapByteBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
503 504 505 506
	$(prep-target)
	@$(RM) $@.temp
	TYPE=byte SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
507
$(BUF_GEN)/HeapByteBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
508 509 510 511
	$(prep-target)
	@$(RM) $@.temp
	TYPE=byte RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
512
$(BUF_GEN)/HeapCharBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
513 514 515 516
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
517
$(BUF_GEN)/HeapCharBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
518 519 520 521
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
522
$(BUF_GEN)/HeapShortBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
523 524 525 526
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
527
$(BUF_GEN)/HeapShortBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
528 529 530 531
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
532
$(BUF_GEN)/HeapIntBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
533 534 535 536
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
537
$(BUF_GEN)/HeapIntBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
538 539 540 541
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
542
$(BUF_GEN)/HeapLongBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
543 544 545 546
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
547
$(BUF_GEN)/HeapLongBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
548 549 550 551
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
552
$(BUF_GEN)/HeapFloatBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
553 554 555 556
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
557
$(BUF_GEN)/HeapFloatBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
558 559 560 561
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
562
$(BUF_GEN)/HeapDoubleBuffer.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
563 564 565 566
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
567
$(BUF_GEN)/HeapDoubleBuffer%.java: $(HEAP_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
568 569 570 571 572 573 574
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double RW=$* SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Direct byte buffer
# 
575 576
$(BUF_GEN)/DirectByteBuffer.java: $(DIRECT_X_BUF_TEMPLATE) \
				  $(DIRECT_X_BUF_TEMPLATE) \
D
duke 已提交
577 578 579 580 581
				  $(GEN_BUFFER_SH)
	$(prep-target)
	@$(RM) $@.temp
	TYPE=byte BIN=1 SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
582 583
$(BUF_GEN)/DirectByteBuffer%.java: $(DIRECT_X_BUF_TEMPLATE) \
				   $(DIRECT_X_BUF_TEMPLATE) \
D
duke 已提交
584 585 586 587 588 589 590 591
				   $(GEN_BUFFER_SH)
	$(prep-target)
	@$(RM) $@.temp
	TYPE=byte RW=$* BIN=1 SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Unswapped views of direct byte buffers
#
592
$(BUF_GEN)/DirectCharBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
593 594 595 596
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
597
$(BUF_GEN)/DirectCharBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
598 599 600 601
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
602
$(BUF_GEN)/DirectShortBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
603 604 605 606
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
607
$(BUF_GEN)/DirectShortBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
608 609 610 611
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
612
$(BUF_GEN)/DirectIntBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
613 614 615 616
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
617
$(BUF_GEN)/DirectIntBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
618 619 620 621
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
622
$(BUF_GEN)/DirectLongBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
623 624 625 626
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
627
$(BUF_GEN)/DirectLongBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
628 629 630 631
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
632
$(BUF_GEN)/DirectFloatBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
633 634 635 636
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
637
$(BUF_GEN)/DirectFloatBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
638 639 640 641
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
642
$(BUF_GEN)/DirectDoubleBufferU.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
643 644 645 646
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
647
$(BUF_GEN)/DirectDoubleBuffer%U.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
648 649 650 651 652 653 654
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double RW=$* BO=U SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Swapped views of direct byte buffers
#
655
$(BUF_GEN)/DirectCharBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
656 657 658 659
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
660
$(BUF_GEN)/DirectCharBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
661 662 663 664
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
665
$(BUF_GEN)/DirectShortBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
666 667 668 669
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
670
$(BUF_GEN)/DirectShortBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
671 672 673 674
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
675
$(BUF_GEN)/DirectIntBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
676 677 678 679
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
680
$(BUF_GEN)/DirectIntBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
681 682 683 684
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
685
$(BUF_GEN)/DirectLongBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
686 687 688 689
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
690
$(BUF_GEN)/DirectLongBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
691 692 693 694
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
695
$(BUF_GEN)/DirectFloatBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
696 697 698 699
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
700
$(BUF_GEN)/DirectFloatBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
701 702 703 704
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
705
$(BUF_GEN)/DirectDoubleBufferS.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
706 707 708 709
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
710
$(BUF_GEN)/DirectDoubleBuffer%S.java: $(DIRECT_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
711 712 713 714 715 716 717
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double RW=$* BO=S SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Big-endian views of byte buffers
#
718
$(BUF_GEN)/ByteBufferAsCharBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
719 720 721 722
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
723
$(BUF_GEN)/ByteBufferAsCharBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
724 725 726 727
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
728
$(BUF_GEN)/ByteBufferAsShortBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
729 730 731 732
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
733
$(BUF_GEN)/ByteBufferAsShortBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
734 735 736 737
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
738
$(BUF_GEN)/ByteBufferAsIntBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
739 740 741 742
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
743
$(BUF_GEN)/ByteBufferAsIntBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
744 745 746 747
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
748
$(BUF_GEN)/ByteBufferAsLongBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
749 750 751 752
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
753
$(BUF_GEN)/ByteBufferAsLongBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
754 755 756 757
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
758
$(BUF_GEN)/ByteBufferAsFloatBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
759 760 761 762
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
763
$(BUF_GEN)/ByteBufferAsFloatBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
764 765 766 767
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
768
$(BUF_GEN)/ByteBufferAsDoubleBufferB.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
769 770 771 772
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
773
$(BUF_GEN)/ByteBufferAsDoubleBuffer%B.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
774 775 776 777 778 779 780
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double RW=$* BO=B SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

# Little-endian views of byte buffers
#
781
$(BUF_GEN)/ByteBufferAsCharBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
782 783 784 785
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
786
$(BUF_GEN)/ByteBufferAsCharBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
787 788 789 790
	$(prep-target)
	@$(RM) $@.temp
	TYPE=char RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
791
$(BUF_GEN)/ByteBufferAsShortBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
792 793 794 795
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
796
$(BUF_GEN)/ByteBufferAsShortBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
797 798 799 800
	$(prep-target)
	@$(RM) $@.temp
	TYPE=short RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
801
$(BUF_GEN)/ByteBufferAsIntBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
802 803 804 805
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
806
$(BUF_GEN)/ByteBufferAsIntBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
807 808 809 810
	$(prep-target)
	@$(RM) $@.temp
	TYPE=int RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
811
$(BUF_GEN)/ByteBufferAsLongBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
812 813 814 815
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
816
$(BUF_GEN)/ByteBufferAsLongBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
817 818 819 820
	$(prep-target)
	@$(RM) $@.temp
	TYPE=long RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
821
$(BUF_GEN)/ByteBufferAsFloatBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
822 823 824 825
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
826
$(BUF_GEN)/ByteBufferAsFloatBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
827 828 829 830
	$(prep-target)
	@$(RM) $@.temp
	TYPE=float RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
831
$(BUF_GEN)/ByteBufferAsDoubleBufferL.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
832 833 834 835
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@
836
$(BUF_GEN)/ByteBufferAsDoubleBuffer%L.java: $(BYTE_X_BUF_TEMPLATE) $(GEN_BUFFER_SH)
D
duke 已提交
837 838 839 840 841 842 843 844 845 846 847
	$(prep-target)
	@$(RM) $@.temp
	TYPE=double RW=$* BO=L SRC=$< DST=$@.temp $(GEN_BUFFER_CMD)
	$(MV) $@.temp $@

#
# Generated coder classes
#

GEN_CODER_SH = genCoder.sh

848
GEN_CODER_CMD = SPP="$(SPP_CMD)" SED="$(SED)" NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_CODER_SH)
D
duke 已提交
849

850
$(CS_GEN)/CharsetDecoder.java: $(CHARSET_X_CODER_TEMPLATE) $(GEN_CODER_SH)
D
duke 已提交
851 852 853 854 855
	$(prep-target)
	@$(RM) $@.temp
	$(GEN_CODER_CMD) decoder $< $@.temp
	$(MV) $@.temp $@

856
$(CS_GEN)/CharsetEncoder.java: $(CHARSET_X_CODER_TEMPLATE) $(GEN_CODER_SH)
D
duke 已提交
857 858 859 860 861 862 863 864 865 866
	$(prep-target)
	@$(RM) $@.temp
	$(GEN_CODER_CMD) encoder $< $@.temp
	$(MV) $@.temp $@

#
# Generated exception classes
#

GEN_EX_SH = genExceptions.sh
867

868
GEN_EX_CMD = NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_EX_SH)
D
duke 已提交
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894

$(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions
	$(prep-target)
	@$(RM) $@.temp
	$(GEN_EX_CMD) $(CH_SRC)/exceptions $(CH_GEN)

$(CS_GEN)/%Exception.java: genExceptions.sh $(CS_SRC)/exceptions
	$(prep-target)
	@$(RM) $@.temp
	$(GEN_EX_CMD) $(CS_SRC)/exceptions $(CS_GEN)

$(BUF_GEN)/%Exception.java: genExceptions.sh $(BUF_SRC)/exceptions
	$(prep-target)
	@$(RM) $@.temp
	$(GEN_EX_CMD) $(BUF_SRC)/exceptions $(BUF_GEN)

#
# Generated charset-provider classes
#

HASHER_JARFILE = $(BUILDTOOLJARDIR)/hasher.jar

$(SCS_GEN)/StandardCharsets.java: genCharsetProvider.sh \
    $(HASHER_JARFILE) $(SCS_SRC)/standard-charsets
	$(prep-target)
	@$(RM) $@.temp
895
	NAWK="$(NAWK)" TEMPDIR="$(TEMPDIR)" SH="$(SH)" \
D
duke 已提交
896
	  HASHER="$(BOOT_JAVA_CMD) -jar $(HASHER_JARFILE)" \
897
	  $(SH) -e genCharsetProvider.sh $(SCS_SRC)/standard-charsets $(SCS_GEN)
D
duke 已提交
898

899 900 901 902 903 904 905 906 907 908
#
# Generated channel implementation classes.
# C source is compiled in TEMPDIR to avoid turds left by Windows compilers.
#

GENSOR_SRC = $(SHARE_SRC)/native/sun/nio/ch/genSocketOptionRegistry.c

GENSOR_EXE = $(TEMPDIR)/genSocketOptionRegistry$(EXE_SUFFIX)

SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSOR_SRC) | \
909
	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }') 
910 911

$(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
912
	$(install-file)
913

914 915 916 917 918 919
ifeq ($(PLATFORM), macosx)
  NIO_CC=$(HOST_CC)
else
  NIO_CC=$(CC)
endif

920 921
$(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
	$(prep-target)
922
	($(CD) $(TEMPDIR); $(NIO_CC) $(CPPFLAGS) $(LDDFLAGS) \
923 924
	   -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))

925 926 927 928 929
ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
$(SCH_GEN)/SocketOptionRegistry.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/ch/SocketOptionRegistry-$(PLATFORM)-$(ARCH).java
	$(prep-target)
	$(CP) $< $@
else 
930 931
$(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
	$(prep-target)
932
	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@
933
	$(GENSOR_EXE) >> $@
934
endif
935 936 937 938 939 940
#
# Generated sun.nio.cs SingleByte classes
#
GENCSSRC = $(BUILDDIR)/tools/CharsetMapping
CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar

941
$(FILES_gensbcs_out): $(GENCSSRC)/SingleByte-X.java.template $(GENCSSRC)/sbcs
942
	@$(prep-target)
943
	$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSSRC) $(SCS_GEN) sbcs
944

945 946 947 948 949 950
# 
# Generated file system implementation classes (Unix only)
#

GENUC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genUnixConstants.c

951
GENUC_OBJ = $(TEMPDIR)/genUnixConstants.o
952 953 954
GENUC_EXE = $(TEMPDIR)/genUnixConstants

GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \
955
	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
956 957 958

$(GENUC_EXE) : $(GENUC_SRC)
	$(prep-target)
959 960
	$(CC) $(CPPFLAGS) -c -o $(GENUC_OBJ) $(GENUC_SRC)
	$(CC) $(CPPFLAGS) -o $@ $(GENUC_OBJ)
961

962 963 964 965 966
ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
$(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
	$(prep-target)
	$(CP) $< $@
else
967 968
$(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
	$(prep-target)
969
	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@
970
	$(GENUC_EXE) >> $@
971
endif
972 973 974

GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c

975
GENSC_OBJ = $(TEMPDIR)/genSolarisConstants.o
976 977 978
GENSC_EXE = $(TEMPDIR)/genSolarisConstants

GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \
979
	$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
980 981 982

$(GENSC_EXE) : $(GENSC_SRC)
	$(prep-target)
983 984
	$(CC) $(CPPFLAGS) -c -o $(GENSC_OBJ) $(GENSC_SRC)
	$(CC) $(CPPFLAGS) -o $@ $(GENSC_OBJ)
985

986 987 988 989 990
ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
$(SFS_GEN)/SolarisConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/SolarisConstants-$(PLATFORM)-$(ARCH).java
	$(prep-target)
	$(CP) $< $@
else
991 992
$(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
	$(prep-target)
993
	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@
994
	$(GENSC_EXE) >> $@
995
endif
996

D
duke 已提交
997
.PHONY: sources