author | katleman |
Thu, 17 Apr 2014 10:14:07 -0700 | |
changeset 23965 | 987510c49ac7 |
parent 23016 | 1805013d2034 |
child 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
16476
e269be167fae
8001334: Remove use of JVM_* functions from java.io code
dxu
parents:
15676
diff
changeset
|
2 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
20547 | 26 |
BUILD_LIBNIO_SRC := \ |
27 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \ |
|
28 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \ |
|
29 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs |
|
30 |
||
31 |
BUILD_LIBNIO_CFLAGS := \ |
|
32 |
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \ |
|
33 |
-I$(JDK_TOPDIR)/src/share/native/java/io \ |
|
34 |
-I$(JDK_TOPDIR)/src/share/native/java/net \ |
|
35 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net |
|
36 |
||
37 |
BUILD_LIBNIO_FILES := \ |
|
38 |
DatagramChannelImpl.c \ |
|
39 |
DatagramDispatcher.c \ |
|
40 |
FileChannelImpl.c \ |
|
41 |
FileDispatcherImpl.c \ |
|
42 |
FileKey.c \ |
|
43 |
IOUtil.c \ |
|
44 |
MappedByteBuffer.c \ |
|
45 |
Net.c \ |
|
46 |
ServerSocketChannelImpl.c \ |
|
47 |
SocketChannelImpl.c \ |
|
48 |
SocketDispatcher.c |
|
49 |
||
50 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
51 |
BUILD_LIBNIO_FILES += \ |
|
52 |
Iocp.c \ |
|
53 |
RegistryFileTypeDetector.c \ |
|
54 |
WindowsAsynchronousFileChannelImpl.c \ |
|
55 |
WindowsAsynchronousServerSocketChannelImpl.c \ |
|
56 |
WindowsAsynchronousSocketChannelImpl.c \ |
|
57 |
WindowsNativeDispatcher.c \ |
|
58 |
WindowsSelectorImpl.c |
|
59 |
endif |
|
60 |
||
61 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
21805 | 62 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 63 |
BUILD_LIBNIO_FILES += \ |
64 |
EPoll.c \ |
|
65 |
EPollArrayWrapper.c \ |
|
66 |
EPollPort.c \ |
|
67 |
InheritedChannel.c \ |
|
68 |
NativeThread.c \ |
|
69 |
PollArrayWrapper.c \ |
|
70 |
UnixAsynchronousServerSocketChannelImpl.c \ |
|
71 |
UnixAsynchronousSocketChannelImpl.c \ |
|
72 |
GnomeFileTypeDetector.c \ |
|
73 |
MagicFileTypeDetector.c \ |
|
74 |
LinuxNativeDispatcher.c \ |
|
75 |
LinuxWatchService.c \ |
|
76 |
UnixCopyFile.c \ |
|
77 |
UnixNativeDispatcher.c |
|
78 |
endif |
|
79 |
||
80 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
21805 | 81 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 82 |
BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch |
83 |
BUILD_LIBNIO_FILES += \ |
|
84 |
InheritedChannel.c \ |
|
85 |
NativeThread.c \ |
|
86 |
PollArrayWrapper.c \ |
|
87 |
UnixAsynchronousServerSocketChannelImpl.c \ |
|
88 |
UnixAsynchronousSocketChannelImpl.c \ |
|
89 |
BsdNativeDispatcher.c \ |
|
90 |
MacOSXNativeDispatcher.c \ |
|
91 |
UnixCopyFile.c \ |
|
92 |
UnixNativeDispatcher.c \ |
|
93 |
KQueue.c \ |
|
94 |
KQueuePort.c \ |
|
95 |
KQueueArrayWrapper.c |
|
96 |
endif |
|
97 |
||
98 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
21805 | 99 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 100 |
BUILD_LIBNIO_FILES += \ |
101 |
DevPollArrayWrapper.c \ |
|
102 |
InheritedChannel.c \ |
|
103 |
NativeThread.c \ |
|
104 |
PollArrayWrapper.c \ |
|
105 |
SolarisEventPort.c \ |
|
106 |
UnixAsynchronousServerSocketChannelImpl.c \ |
|
107 |
UnixAsynchronousSocketChannelImpl.c \ |
|
108 |
GnomeFileTypeDetector.c \ |
|
109 |
SolarisNativeDispatcher.c \ |
|
110 |
SolarisWatchService.c \ |
|
111 |
UnixCopyFile.c \ |
|
112 |
UnixNativeDispatcher.c |
|
113 |
endif |
|
114 |
||
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
115 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
22599
d361ec315b16
8029669: PPC64: 8027566 changes broke AIX build after sync
simonis
parents:
22598
diff
changeset
|
116 |
BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
117 |
BUILD_LIBNIO_SRC += \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
118 |
$(JDK_TOPDIR)/src/aix/native/sun/nio/ch \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
22595
diff
changeset
|
119 |
$(JDK_TOPDIR)/src/aix/native/sun/nio/fs |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
120 |
BUILD_LIBNIO_FILES += \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
121 |
AixPollPort.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
122 |
InheritedChannel.c \ |
23016
1805013d2034
8033154: PPC64: Fix AIX build after integration into jdk9/dev
simonis
parents:
22607
diff
changeset
|
123 |
AixNativeThread.c \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
124 |
PollArrayWrapper.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
125 |
UnixAsynchronousServerSocketChannelImpl.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
126 |
UnixAsynchronousSocketChannelImpl.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
127 |
GnomeFileTypeDetector.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
128 |
UnixCopyFile.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
129 |
AixNativeDispatcher.c \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
130 |
UnixNativeDispatcher.c |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
131 |
endif |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
132 |
|
20547 | 133 |
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ |
134 |
LIBRARY := nio, \ |
|
135 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
136 |
SRC := $(BUILD_LIBNIO_SRC), \ |
|
137 |
INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \ |
|
138 |
LANG := C, \ |
|
139 |
OPTIMIZATION := HIGH, \ |
|
140 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
141 |
$(BUILD_LIBNIO_CFLAGS), \ |
|
142 |
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \ |
|
143 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \ |
|
144 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
145 |
LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
146 |
LDFLAGS_SUFFIX_aix := -ljava -lnet $(LIBDL),\ |
20547 | 147 |
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \ |
148 |
-lsendfile -ljava -lnet -lc, \ |
|
149 |
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \ |
|
150 |
$(JDK_OUTPUTDIR)/objs/libnet/net.lib \ |
|
151 |
advapi32.lib, \ |
|
152 |
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \ |
|
153 |
LDFLAGS_SUFFIX :=, \ |
|
154 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
155 |
RC_FLAGS := $(RC_FLAGS) \ |
|
156 |
-D "JDK_FNAME=nio.dll" \ |
|
157 |
-D "JDK_INTERNAL_NAME=nio" \ |
|
158 |
-D "JDK_FTYPE=0x2L", \ |
|
159 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \ |
|
160 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
161 |
||
162 |
BUILD_LIBRARIES += $(BUILD_LIBNIO) |
|
163 |
||
164 |
$(BUILD_LIBNIO): $(BUILD_LIBNET) |
|
165 |
||
166 |
########################################################################################## |
|
167 |
||
168 |
ifeq ($(OPENJDK_TARGET_OS_API), posix) |
|
169 |
||
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
170 |
ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix)) |
20547 | 171 |
|
20900
c5e76df5aa74
8027059: (sctp) fatal warnings overly restrictive with gcc 4.8.1
chegar
parents:
20896
diff
changeset
|
172 |
# Suppress unused parameters required by exported JNI functions. |
c5e76df5aa74
8027059: (sctp) fatal warnings overly restrictive with gcc 4.8.1
chegar
parents:
20896
diff
changeset
|
173 |
SCTP_WERROR := -Werror -Wno-error=unused-parameter |
20547 | 174 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc) |
175 |
SCTP_WERROR := |
|
176 |
endif |
|
177 |
||
178 |
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \ |
|
179 |
LIBRARY := sctp, \ |
|
180 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
181 |
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \ |
|
182 |
LANG := C, \ |
|
183 |
OPTIMIZATION := LOW, \ |
|
184 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
185 |
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \ |
|
186 |
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \ |
|
187 |
-I$(JDK_TOPDIR)/src/share/native/java/net \ |
|
188 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \ |
|
189 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net, \ |
|
190 |
CFLAGS_linux := $(SCTP_WERROR), \ |
|
21805 | 191 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \ |
20547 | 192 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
193 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
194 |
LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \ |
|
195 |
LDFLAGS_SUFFIX_posix := -lnio -lnet, \ |
|
196 |
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \ |
|
197 |
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \ |
|
198 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \ |
|
199 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
200 |
||
201 |
BUILD_LIBRARIES += $(BUILD_LIBSCTP) |
|
202 |
||
203 |
$(BUILD_LIBSCTP): $(BUILD_LIBNIO) |
|
204 |
endif |
|
205 |
endif |