1 # 2 # Copyright (c) 2011, 2014, 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 LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libnet \ 27 $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnet 28 LIBNET_CFLAGS += -I$(SUPPORT_OUTPUTDIR)/headers/java.base \ 29 $(LIBJAVA_HEADER_FLAGS) 30 31 LIBNET_CFLAGS += $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir)) 32 33 LIBNET_EXCLUDE_FILES := 34 ifneq ($(OPENJDK_TARGET_OS), solaris) 35 LIBNET_EXCLUDE_FILES += solaris_close.c 36 endif 37 38 ifneq ($(OPENJDK_TARGET_OS), linux) 39 LIBNET_EXCLUDE_FILES += linux_close.c 40 endif 41 42 ifneq ($(OPENJDK_TARGET_OS), macosx) 43 LIBNET_EXCLUDE_FILES += bsd_close.c 44 endif 45 46 ifeq ($(OPENJDK_TARGET_OS), aix) 47 LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnet/java/net/ 48 endif 49 50 $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \ 51 LIBRARY := net, \ 52 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ 53 SRC := $(LIBNET_SRC_DIRS), \ 54 EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \ 55 LANG := C, \ 56 OPTIMIZATION := LOW, \ 57 CFLAGS := $(CFLAGS_JDKLIB) \ 58 $(LIBNET_CFLAGS), \ 59 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \ 60 LDFLAGS := $(LDFLAGS_JDKLIB) \ 61 $(call SET_SHARED_LIBRARY_ORIGIN), \ 62 LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \ 63 LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \ 64 LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \ 65 LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\ 66 LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \ 67 delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \ 68 -DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \ 69 VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ 70 RC_FLAGS := $(RC_FLAGS) \ 71 -D "JDK_FNAME=net.dll" \ 72 -D "JDK_INTERNAL_NAME=net" \ 73 -D "JDK_FTYPE=0x2L", \ 74 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \ 75 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) 76 77 $(BUILD_LIBNET): $(BUILD_LIBJAVA) 78 79 TARGETS += $(BUILD_LIBNET) 80