jdk
114 строк · 4.5 Кб
1#
2# Copyright (c) 2014, 2024, 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
26include LibCommon.gmk
27
28################################################################################
29
30ifeq ($(call isTargetOs, windows), true)
31ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
32
33##############################################################################
34# Setup rules to create 32/64 bit version of javaaccessbridge
35#
36# Parameter 1 Suffix
37# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
38##############################################################################
39define SetupJavaDLL
40$(call SetupJdkLibrary, BUILD_LIBJAVAACCESSBRIDGE$1, \
41NAME := javaaccessbridge$1, \
42SRC := libjavaaccessbridge, \
43EXTRA_SRC := common, \
44OPTIMIZATION := LOW, \
45DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
46CXXFLAGS_FILTER_OUT := -MD, \
47CXXFLAGS := -MT -DACCESSBRIDGE_ARCH_$2, \
48EXTRA_HEADER_DIRS := \
49include/bridge \
50java.desktop:include, \
51JDK_LIBS := java.desktop:libjawt, \
52LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
53odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
54user32.lib uuid.lib winspool.lib, \
55VERSIONINFO_RESOURCE := \
56$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
57)
58
59TARGETS += $$(BUILD_LIBJAVAACCESSBRIDGE$1)
60endef
61
62##############################################################################
63# Setup rules to create 32/64 bit version of windowsaccessbridge
64#
65# Parameter 1 Suffix
66# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
67##############################################################################
68define SetupWinDLL
69$(call SetupJdkLibrary, BUILD_LIBWINDOWSACCESSBRIDGE$1, \
70NAME := windowsaccessbridge$1, \
71SRC := libwindowsaccessbridge, \
72EXTRA_SRC := common, \
73OPTIMIZATION := LOW, \
74DISABLED_WARNINGS_microsoft_WinAccessBridge.cpp := 4302 4311, \
75CXXFLAGS := -DACCESSBRIDGE_ARCH_$2, \
76EXTRA_HEADER_DIRS := \
77include/bridge, \
78LDFLAGS := \
79-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
80LIBS_windows := advapi32.lib comdlg32.lib gdi32.lib kernel32.lib \
81odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib \
82user32.lib uuid.lib winspool.lib, \
83VERSIONINFO_RESOURCE := \
84$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
85)
86
87TARGETS += $$(BUILD_LIBWINDOWSACCESSBRIDGE$1)
88endef
89
90ifeq ($(call isTargetCpuBits, 32), true)
91############################################################################
92# Build libjabsysinfo
93############################################################################
94
95$(eval $(call SetupJdkLibrary, BUILD_LIBJABSYSINFO, \
96NAME := jabsysinfo, \
97OPTIMIZATION := LOW, \
98VERSIONINFO_RESOURCE := \
99$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
100)
101
102TARGETS += $(BUILD_LIBJABSYSINFO)
103endif
104
105ifeq ($(call isTargetCpuBits, 32), true)
106$(eval $(call SetupJavaDLL,-32,32))
107$(eval $(call SetupJavaDLL,,LEGACY))
108$(eval $(call SetupWinDLL,-32,32))
109$(eval $(call SetupWinDLL,,LEGACY))
110else
111$(eval $(call SetupJavaDLL,,64))
112$(eval $(call SetupWinDLL,-64,64))
113endif
114endif
115