author | duke |
Wed, 05 Jul 2017 20:34:59 +0200 | |
changeset 30705 | 9104b426a3e8 |
parent 30434 | 6b881118c93b |
child 31450 | 35fe554da3fb |
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 := \ |
25859 | 27 |
$(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
|
28 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio \ |
25859 | 29 |
$(sort $(wildcard \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
26225
diff
changeset
|
30 |
$(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
|
31 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/fs \ |
25859 | 32 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/ch \ |
33 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/fs)) \ |
|
34 |
# |
|
20547 | 35 |
|
36 |
BUILD_LIBNIO_CFLAGS := \ |
|
25859 | 37 |
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \ |
27565 | 38 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
25859 | 39 |
$(LIBJAVA_HEADER_FLAGS) \ |
40 |
$(addprefix -I, $(BUILD_LIBNET_SRC)) |
|
20547 | 41 |
|
42 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
21805 | 43 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 44 |
endif |
45 |
||
46 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
21805 | 47 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
25859 | 48 |
BUILD_LIBNIO_EXFILES += \ |
49 |
GnomeFileTypeDetector.c \ |
|
50 |
# |
|
20547 | 51 |
endif |
52 |
||
53 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
21805 | 54 |
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) |
20547 | 55 |
endif |
56 |
||
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
57 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
22599
d361ec315b16
8029669: PPC64: 8027566 changes broke AIX build after sync
simonis
parents:
22598
diff
changeset
|
58 |
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
|
59 |
BUILD_LIBNIO_EXFILES += \ |
3c7e92c78bab
8056246: Fix AIX build after the Modular Source Code change 8054834
simonis
parents:
25859
diff
changeset
|
60 |
NativeThread.c |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
61 |
endif |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
62 |
|
20547 | 63 |
$(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ |
64 |
LIBRARY := nio, \ |
|
65 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
66 |
SRC := $(BUILD_LIBNIO_SRC), \ |
|
25859 | 67 |
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \ |
20547 | 68 |
OPTIMIZATION := HIGH, \ |
69 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
70 |
$(BUILD_LIBNIO_CFLAGS), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28658
diff
changeset
|
71 |
DISABLED_WARNINGS_gcc := type-limits, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28658
diff
changeset
|
72 |
DISABLED_WARNINGS_clang := tautological-compare, \ |
30434 | 73 |
DISABLED_WARNINGS_microsoft := 4244 4996, \ |
20547 | 74 |
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \ |
75 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \ |
|
76 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
77 |
LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
78 |
LDFLAGS_SUFFIX_aix := -ljava -lnet $(LIBDL),\ |
20547 | 79 |
LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \ |
80 |
-lsendfile -ljava -lnet -lc, \ |
|
81 |
LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \ |
|
27565 | 82 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \ |
20547 | 83 |
advapi32.lib, \ |
84 |
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \ |
|
85 |
LDFLAGS_SUFFIX :=, \ |
|
25859 | 86 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 87 |
RC_FLAGS := $(RC_FLAGS) \ |
88 |
-D "JDK_FNAME=nio.dll" \ |
|
89 |
-D "JDK_INTERNAL_NAME=nio" \ |
|
90 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 91 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnio, \ |
20547 | 92 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
93 |
||
27565 | 94 |
TARGETS += $(BUILD_LIBNIO) |
20547 | 95 |
|
96 |
$(BUILD_LIBNIO): $(BUILD_LIBNET) |