1 # 2 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 BUILDDIR = ../.. 27 MODULE = base 28 PACKAGE = java.net 29 LIBRARY = net 30 PRODUCT = sun 31 include $(BUILDDIR)/common/Defs.gmk 32 33 # 34 # Files 35 # 36 include FILES_c.gmk 37 38 AUTO_FILES_JAVA_DIRS = java/net 39 40 ifeq ($(PLATFORM), windows) 41 # Windows 9x module only needed on 32-bit build 42 ifeq ($(ARCH_DATA_MODEL), 32) 43 FILES_c += NetworkInterface_win9x.c 44 endif 45 FILES_c += NTLMAuthSequence.c 46 FILES_c += NetworkInterface_winXP.c 47 else 48 FILES_c += SdpSupport.c 49 endif 50 51 FILES_export = \ 52 java/net/Socket.java \ 53 java/net/SocketOptions.java \ 54 java/net/SocketImpl.java \ 55 java/net/AbstractPlainSocketImpl.java \ 56 java/net/PlainSocketImpl.java \ 57 java/net/ServerSocket.java \ 58 java/net/InetAddress.java \ 59 java/net/Inet4Address.java \ 60 java/net/Inet6Address.java \ 61 java/net/InetAddressImpl.java \ 62 java/net/Inet4AddressImpl.java \ 63 java/net/Inet6AddressImpl.java \ 64 java/net/NetworkInterface.java \ 65 java/net/SocketInputStream.java \ 66 java/net/SocketOutputStream.java \ 67 java/net/DefaultDatagramSocketImplFactory.java \ 68 java/net/DatagramPacket.java \ 69 java/net/DatagramSocket.java \ 70 java/net/DatagramSocketImpl.java \ 71 java/net/AbstractPlainDatagramSocketImpl.java \ 72 java/net/MulticastSocket.java \ 73 java/net/UnknownHostException.java \ 74 java/net/ProtocolException.java \ 75 sun/net/spi/DefaultProxySelector.java 76 77 ifeq ($(PLATFORM), windows) 78 FILES_export += java/net/TwoStacksPlainSocketImpl.java 79 FILES_export += java/net/DualStackPlainSocketImpl.java 80 FILES_export += java/net/TwoStacksPlainDatagramSocketImpl.java 81 FILES_export += java/net/DualStackPlainDatagramSocketImpl.java 82 else 83 FILES_export += java/net/PlainDatagramSocketImpl.java 84 endif 85 86 # 87 # Find platform specific native code 88 # 89 vpath %.c $(PLATFORM_SRC)/native/sun/net/dns $(PLATFORM_SRC)/native/sun/net/www/protocol/http/ntlm \ 90 $(PLATFORM_SRC)/native/sun/net/sdp $(PLATFORM_SRC)/native/sun/net/spi 91 92 # 93 # Include rules 94 # 95 include $(BUILDDIR)/common/Mapfile-vers.gmk 96 97 include $(BUILDDIR)/common/Library.gmk 98 99 ifeq ($(PLATFORM), windows) 100 OTHER_LDLIBS = ws2_32.lib $(JVMLIB) 101 else 102 OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB) 103 endif 104 ifeq ($(PLATFORM), linux) 105 OTHER_LDLIBS += -lpthread 106 endif 107 108 CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl 109 110 # 111 # Resources 112 # 113 LOCALE_SET_DEFINITION = jre 114 115 MISC_FILES = $(LIBDIR) $(LIBDIR)/net.properties 116 117 $(LIBDIR)/net.properties: $(SHARE_SRC)/lib/net.properties 118 $(install-file) 119 120 # 121 # SDP configuration template 122 # 123 ifeq ($(PLATFORM), solaris) 124 SDP_PATH = sdp/sdp.conf.template 125 SDP_CONF = $(LIBDIR)/$(SDP_PATH) 126 $(SDP_CONF): $(PLATFORM_SRC)/lib/$(SDP_PATH) 127 @$(RM) $* 128 $(install-file) 129 130 MISC_FILES += $(SDP_CONF) 131 endif 132 133 build: $(MISC_FILES) 134