1 # |
|
2 # Copyright (c) 2011, 2018, 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 := $(call FindSrcDirsForLib, java.base, net) |
|
27 |
|
28 $(eval $(call SetupNativeCompilation, BUILD_LIBNET, \ |
|
29 NAME := net, \ |
|
30 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
31 SRC := $(LIBNET_SRC_DIRS), \ |
|
32 OPTIMIZATION := LOW, \ |
|
33 CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
|
34 $(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \ |
|
35 DISABLED_WARNINGS_gcc := format-nonliteral, \ |
|
36 DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \ |
|
37 DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \ |
|
38 DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \ |
|
39 MAPFILE := $(TOPDIR)/make/mapfiles/libnet/mapfile-vers, \ |
|
40 LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
41 $(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
42 LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \ |
|
43 LIBS_unix := -ljvm -ljava, \ |
|
44 LIBS_linux := $(LIBDL) -lpthread, \ |
|
45 LIBS_solaris := -lnsl -lsocket $(LIBDL) -lc, \ |
|
46 LIBS_aix := $(LIBDL),\ |
|
47 LIBS_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib winhttp.lib \ |
|
48 delayimp.lib $(WIN_JAVA_LIB) advapi32.lib, \ |
|
49 LIBS_macosx := -framework CoreFoundation -framework CoreServices, \ |
|
50 VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
|
51 RC_FLAGS := $(RC_FLAGS) \ |
|
52 -D "JDK_FNAME=net.dll" \ |
|
53 -D "JDK_INTERNAL_NAME=net" \ |
|
54 -D "JDK_FTYPE=0x2L", \ |
|
55 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet, \ |
|
56 )) |
|
57 |
|
58 $(BUILD_LIBNET): $(BUILD_LIBJAVA) |
|
59 |
|
60 TARGETS += $(BUILD_LIBNET) |
|