jdk/makefiles/lib/NetworkingLibraries.gmk
author simonis
Tue, 26 Nov 2013 16:40:31 +0100
changeset 22597 7515a991bb37
parent 22595 aaa6b141196c
permissions -rw-r--r--
8024854: PPC64: Basic changes and files to build the class library on AIX Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    26
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    27
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    28
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    29
    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    30
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    31
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    32
  LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    33
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    34
  LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    35
endif
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
LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    38
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    39
LIBNET_EXCLUDE_FILES :=
22597
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
    40
ifneq ($(OPENJDK_TARGET_OS), linux)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    41
  LIBNET_EXCLUDE_FILES += linux_close.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    42
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    43
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    44
ifneq ($(OPENJDK_TARGET_OS), macosx)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    45
  LIBNET_EXCLUDE_FILES += bsd_close.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    46
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    47
22597
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
    48
ifeq ($(OPENJDK_TARGET_OS), aix)
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
    49
  LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/aix/native/java/net/
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
    50
endif
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 22595
diff changeset
    51
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    52
ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    53
  LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    54
else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    55
  LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    56
      TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    57
      NTLMAuthSequence.c NetworkInterface_winXP.c
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    58
endif
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    59
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    60
$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    61
    LIBRARY := net, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    62
    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    63
    SRC := $(LIBNET_SRC_DIRS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    64
    EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    65
    LANG := C, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    66
    OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    67
    CFLAGS := $(CFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    68
        $(LIBNET_CFLAGS), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    69
    MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libnet/mapfile-vers, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    70
    LDFLAGS := $(LDFLAGS_JDKLIB) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    71
        $(call SET_SHARED_LIBRARY_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    72
    LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    73
    LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    74
    LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
22595
aaa6b141196c 8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents: 22594
diff changeset
    75
    LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    76
    LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    77
        delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    78
        -DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    79
    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    80
    RC_FLAGS := $(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    81
        -D "JDK_FNAME=net.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    82
        -D "JDK_INTERNAL_NAME=net" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    83
        -D "JDK_FTYPE=0x2L", \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    84
    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnet, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    85
    DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    86
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    87
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    88
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    89
BUILD_LIBRARIES += $(BUILD_LIBNET)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    90
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    91
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    92
	$(ECHO) $(LOG_INFO) Copying $(@F)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    93
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    94
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    95
COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    96
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    97
ifeq ($(OPENJDK_TARGET_OS), solaris)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    98
  $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
    99
	$(ECHO) $(LOG_INFO) Copying $(@F)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   100
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   101
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   102
  COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20203
diff changeset
   103
endif