author | vromero |
Thu, 31 Mar 2016 17:25:58 -0400 | |
changeset 36776 | 5e260fa5208a |
parent 35276 | 50b3cdcef339 |
child 37529 | 868c7195632c |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28658
diff
changeset
|
2 |
# Copyright (c) 2011, 2015, 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 := \ |
32145
83cedbbcd7ba
8065595: Wrong JNI_OnLoad called if just loaded lib does not have JNI_OnLoad function
bpb
parents:
31450
diff
changeset
|
27 |
$(JDK_TOPDIR)/src/java.base/share/native/libnio \ |
25859 | 28 |
$(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
26225
diff
changeset
|
29 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio \ |
25859 | 30 |
$(sort $(wildcard \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
26225
diff
changeset
|
31 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \ |
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
26225
diff
changeset
|
32 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/fs \ |
25859 | 33 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/ch \ |
34 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/fs)) \ |
|
35 |
# |
|
20547 | 36 |
|
37 |
BUILD_LIBNIO_CFLAGS := \ |
|
25859 | 38 |
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \ |
27565 | 39 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
25859 | 40 |
$(LIBJAVA_HEADER_FLAGS) \ |
41 |
$(addprefix -I, $(BUILD_LIBNET_SRC)) |
|
20547 | 42 |
|
43 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
21805 | 44 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 45 |
endif |
46 |
||
47 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
21805 | 48 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
25859 | 49 |
BUILD_LIBNIO_EXFILES += \ |
32410
fbfb7fc9f5c3
8133987: (fs) Rename GnomeFileTypeDetector to GioFileTypeDetector
bpb
parents:
32232
diff
changeset
|
50 |
GioFileTypeDetector.c \ |
25859 | 51 |
# |
20547 | 52 |
endif |
53 |
||
54 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
21805 | 55 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 56 |
endif |
57 |
||
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
58 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
22599
d361ec315b16
8029669: PPC64: 8027566 changes broke AIX build after sync
simonis
parents:
22598
diff
changeset
|
59 |
BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
26225
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
25859
diff
changeset
|
60 |
BUILD_LIBNIO_EXFILES += \ |
34877
0583de363a12
8146425: After change 8142907 'EXCLUDE_FILE' is wrongly interpreted as pattern
simonis
parents:
33406
diff
changeset
|
61 |
/NativeThread.c |
0583de363a12
8146425: After change 8142907 'EXCLUDE_FILE' is wrongly interpreted as pattern
simonis
parents:
33406
diff
changeset
|
62 |
# Notice: we really need the leading slash here because otherwise every |
0583de363a12
8146425: After change 8142907 'EXCLUDE_FILE' is wrongly interpreted as pattern
simonis
parents:
33406
diff
changeset
|
63 |
# FILE_NAME in EXCLUDE_FILES will actually match any file ending in FILE_NAME |
0583de363a12
8146425: After change 8142907 'EXCLUDE_FILE' is wrongly interpreted as pattern
simonis
parents:
33406
diff
changeset
|
64 |
# (e.g. 'NativeThread.c' will also exclude 'AixNativeThread.c'). |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
65 |
endif |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
66 |
|
20547 | 67 |
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ |
68 |
LIBRARY := nio, \ |
|
69 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
70 |
SRC := $(BUILD_LIBNIO_SRC), \ |
|
25859 | 71 |
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \ |
20547 | 72 |
OPTIMIZATION := HIGH, \ |
73 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
74 |
$(BUILD_LIBNIO_CFLAGS), \ |
|
75 |
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \ |
|
33406 | 76 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
20547 | 77 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
33406 | 78 |
LIBS_unix := -ljava -lnet, \ |
79 |
LIBS_linux := -lpthread $(LIBDL), \ |
|
80 |
LIBS_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \ |
|
81 |
-lsendfile -lc, \ |
|
82 |
LIBS_aix := $(LIBDL), \ |
|
83 |
LIBS_macosx := \ |
|
84 |
-framework CoreFoundation -framework CoreServices, \ |
|
85 |
LIBS_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \ |
|
27565 | 86 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \ |
20547 | 87 |
advapi32.lib, \ |
25859 | 88 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 89 |
RC_FLAGS := $(RC_FLAGS) \ |
90 |
-D "JDK_FNAME=nio.dll" \ |
|
91 |
-D "JDK_INTERNAL_NAME=nio" \ |
|
92 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 93 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \ |
35276 | 94 |
)) |
20547 | 95 |
|
27565 | 96 |
TARGETS += $(BUILD_LIBNIO) |
20547 | 97 |
|
98 |
$(BUILD_LIBNIO): $(BUILD_LIBNET) |