25859
|
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 |
include LibCommon.gmk
|
|
27 |
|
|
28 |
################################################################################
|
|
29 |
|
|
30 |
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \
|
|
31 |
$(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_API_DIR)/native/libmanagement
|
|
32 |
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
|
|
33 |
$(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \
|
|
34 |
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.management \
|
|
35 |
$(LIBJAVA_HEADER_FLAGS) \
|
|
36 |
#
|
|
37 |
|
|
38 |
BUILD_LIBMANAGEMENT_EXCLUDES :=
|
|
39 |
|
|
40 |
ifneq ($(OPENJDK_TARGET_OS), solaris)
|
|
41 |
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
|
|
42 |
endif
|
|
43 |
|
|
44 |
ifneq ($(OPENJDK_TARGET_OS), linux)
|
|
45 |
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
|
|
46 |
endif
|
|
47 |
|
|
48 |
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
|
49 |
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
|
|
50 |
endif
|
|
51 |
|
|
52 |
LIBMANAGEMENT_OPTIMIZATION := HIGH
|
|
53 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
|
|
54 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
|
|
55 |
LIBMANAGEMENT_OPTIMIZATION := LOW
|
|
56 |
endif
|
|
57 |
endif
|
|
58 |
|
|
59 |
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
|
|
60 |
LIBRARY := management, \
|
|
61 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
|
62 |
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
|
|
63 |
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
|
|
64 |
LANG := C, \
|
|
65 |
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
|
|
66 |
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
|
|
67 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
|
|
68 |
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
|
69 |
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
|
70 |
LDFLAGS_solaris := -lkstat, \
|
|
71 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
|
|
72 |
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
|
|
73 |
LDFLAGS_SUFFIX_aix := -lperfstat,\
|
|
74 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
|
75 |
RC_FLAGS := $(RC_FLAGS) \
|
|
76 |
-D "JDK_FNAME=management.dll" \
|
|
77 |
-D "JDK_INTERNAL_NAME=management" \
|
|
78 |
-D "JDK_FTYPE=0x2L", \
|
|
79 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
|
|
80 |
DEBUG_SYMBOLS := true))
|
|
81 |
|
|
82 |
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
|
|
83 |
|
|
84 |
MANAGEMENT_LIBRARIES += $(BUILD_LIBMANAGEMENT)
|
|
85 |
|
|
86 |
################################################################################
|
|
87 |
|
|
88 |
java.management: $(MANAGEMENT_LIBRARIES)
|
|
89 |
|
|
90 |
all: java.management
|
|
91 |
|
|
92 |
.PHONY: all java.management
|