make/lib/NioLibraries.gmk
author ihse
Tue, 13 Mar 2018 14:33:34 +0100
branchihse-jdk-library-branch
changeset 56287 593a452fcbeb
parent 49070 d7859531621b
child 56310 b74ed86a116a
permissions -rw-r--r--
Introduce SetupJdkLibrary and SetupJdkExecutable.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
     2
# Copyright (c) 2011, 2018, 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
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    26
BUILD_LIBNIO_SRC := \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    27
    $(TOPDIR)/src/java.base/share/native/libnio \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    28
    $(TOPDIR)/src/java.base/share/native/libnio/ch \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    29
    $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    30
    $(sort $(wildcard \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    31
      $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    32
      $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/fs \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    33
      $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/ch \
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    34
      $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/fs)) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    35
    #
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    36
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    37
BUILD_LIBNIO_CFLAGS := \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    38
    $(addprefix -I, $(BUILD_LIBNIO_SRC)) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26225
diff changeset
    39
    -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    40
    $(LIBJAVA_HEADER_FLAGS) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    41
    $(addprefix -I, $(BUILD_LIBNET_SRC))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    43
ifeq ($(OPENJDK_TARGET_OS), linux)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    44
  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    45
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    46
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    47
ifeq ($(OPENJDK_TARGET_OS), macosx)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    48
  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    49
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    50
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    51
ifeq ($(OPENJDK_TARGET_OS), solaris)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    52
  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    53
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    54
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    55
ifeq ($(OPENJDK_TARGET_OS), aix)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    56
  BUILD_LIBNIO_MAPFILE := $(TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    57
endif
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    58
56287
593a452fcbeb Introduce SetupJdkLibrary and SetupJdkExecutable.
ihse
parents: 49070
diff changeset
    59
$(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
49070
d7859531621b 8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents: 47217
diff changeset
    60
    NAME := nio, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
    SRC := $(BUILD_LIBNIO_SRC), \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 23016
diff changeset
    62
    EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
    OPTIMIZATION := HIGH, \
37529
868c7195632c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 35276
diff changeset
    64
    WARNINGS_AS_ERRORS_xlc := false, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    66
        $(BUILD_LIBNIO_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
    MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    68
    LDFLAGS := $(LDFLAGS_JDKLIB) \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    69
        $(call SET_SHARED_LIBRARY_ORIGIN), \
33406
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    70
    LIBS_unix := -ljava -lnet, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    71
    LIBS_linux := -lpthread $(LIBDL), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    72
    LIBS_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    73
        -lsendfile -lc, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    74
    LIBS_aix := $(LIBDL), \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    75
    LIBS_macosx := \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    76
        -framework CoreFoundation -framework CoreServices, \
4680f7495292 8140661: Rename LDFLAGS_SUFFIX to LIBS
ihse
parents: 32410
diff changeset
    77
    LIBS_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26225
diff changeset
    78
        $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    79
        advapi32.lib, \
35276
50b3cdcef339 8145596: Enable debug symbols for all libraries
ihse
parents: 34877
diff changeset
    80
))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    81
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 26225
diff changeset
    82
TARGETS += $(BUILD_LIBNIO)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    83
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
$(BUILD_LIBNIO): $(BUILD_LIBNET)