jdk
110 строк · 4.3 Кб
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 LauncherCommon.gmk
27
28ifeq ($(call isTargetOs, windows), true)
29ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
30
31##############################################################################
32# Build jabswitch
33##############################################################################
34
35$(eval $(call SetupJdkExecutable, BUILD_JABSWITCH, \
36NAME := jabswitch, \
37CXXFLAGS_FILTER_OUT := -Zc:wchar_t-, \
38CXXFLAGS := -Zc:wchar_t -analyze- -Od -Gd -D_WINDOWS -D_UNICODE \
39-DUNICODE -RTC1 -EHsc, \
40DISABLED_WARNINGS_microsoft_jabswitch.cpp := 4267 4996, \
41LIBS_windows := advapi32.lib user32.lib version.lib, \
42VERSIONINFO_RESOURCE := \
43$(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
44MANIFEST := $(ACCESSIBILITY_SRCDIR)/jabswitch/jabswitch.manifest, \
45MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
46))
47
48TARGETS += $(BUILD_JABSWITCH)
49
50##############################################################################
51# Setup rules to create 32/64 bit version of jaccessinspector
52#
53# Parameter 1 File name suffix
54# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
55##############################################################################
56define SetupInspector
57$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
58NAME := jaccessinspector$1, \
59SRC := jaccessinspector, \
60EXTRA_SRC := \
61bridge \
62common \
63toolscommon, \
64EXTRA_HEADER_DIRS := include/bridge, \
65CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
66CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
67LDFLAGS_windows := -stack:655360, \
68LIBS_windows := advapi32.lib user32.lib, \
69VERSIONINFO_RESOURCE := \
70$(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
71))
72
73TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
74endef
75
76##############################################################################
77# Setup rules to create 32/64 bit version of jaccesswalker
78# Parameter 1 File name suffix
79# Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix
80##############################################################################
81define SetupWalker
82$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
83NAME := jaccesswalker$1, \
84SRC := jaccesswalker, \
85EXTRA_SRC := \
86bridge \
87common \
88toolscommon, \
89EXTRA_HEADER_DIRS := include/bridge, \
90CFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
91CXXFLAGS := -DACCESSBRIDGE_ARCH_$2 -EHsc, \
92LDFLAGS_windows := -stack:655360, \
93LIBS_windows := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
94VERSIONINFO_RESOURCE := \
95$(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
96))
97
98TARGETS += $$(BUILD_JACCESSWALKER$1)
99endef
100
101ifeq ($(call isTargetCpuBits, 32), true)
102$(eval $(call SetupInspector,-32,32))
103$(eval $(call SetupWalker,-32,32))
104$(eval $(call SetupInspector,,LEGACY))
105$(eval $(call SetupWalker,,LEGACY))
106else
107$(eval $(call SetupInspector,,64))
108$(eval $(call SetupWalker,,64))
109endif
110endif
111