1 # 2 # Copyright (c) 2014, 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 include LauncherCommon.gmk 27 28 ################################################################################ 29 # jabswitch 30 31 ifeq ($(OPENJDK_TARGET_OS), windows) 32 33 JABSWITCH_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/jabswitch 34 ACCESSBRIDGE_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/common 35 36 $(eval $(call SetupNativeCompilation, BUILD_JABSWITCH, \ 37 NAME := jabswitch, \ 38 TYPE := EXECUTABLE, \ 39 SRC := $(JABSWITCH_SRC), \ 40 INCLUDE_FILES := jabswitch.cpp, \ 41 CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \ 42 -analyze- -Od -Gd -D_WINDOWS \ 43 -D_UNICODE -DUNICODE -RTC1 -EHsc, \ 44 DISABLED_WARNINGS_microsoft := 4267 4996, \ 45 LDFLAGS := $(LDFLAGS_JDKEXE), \ 46 LIBS := advapi32.lib version.lib user32.lib, \ 47 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \ 48 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \ 49 VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \ 50 RC_FLAGS := $(RC_FLAGS) \ 51 -D "JDK_FNAME=jabswitch.exe" \ 52 -D "JDK_INTERNAL_NAME=jabswitch" \ 53 -D "JDK_FTYPE=0x01L", \ 54 MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \ 55 MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \ 56 )) 57 58 TARGETS += $(BUILD_JABSWITCH) 59 60 ################################################################################ 61 # jaccessinspector 62 63 TOPDIR := $(TOPDIR)/src/jdk.accessibility/windows/native 64 TOOLS_CFLAGS := $(addprefix -I, \ 65 $(TOPDIR)/include/bridge \ 66 $(TOPDIR)/common \ 67 $(TOPDIR)/toolscommon) 68 69 define SetupInspector 70 # Parameter 1 File name suffix 71 # Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix 72 73 $$(eval $$(call SetupNativeCompilation, BUILD_JACCESSINSPECTOR$1, \ 74 NAME := jaccessinspector$1, \ 75 TYPE := EXECUTABLE, \ 76 SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \ 77 $(TOPDIR)/toolscommon $(TOPDIR)/bridge, \ 78 CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \ 79 LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \ 80 LIBS := advapi32.lib user32.lib, \ 81 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccessinspector$1, \ 82 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \ 83 VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \ 84 RC_FLAGS := $$(RC_FLAGS) \ 85 -D "JDK_FNAME=jaccessinspector$1.exe" \ 86 -D "JDK_INTERNAL_NAME=jaccessinspector$1" \ 87 -D "JDK_FTYPE=0x01L", \ 88 )) 89 90 TARGETS += $$(BUILD_JACCESSINSPECTOR$1) 91 92 endef 93 94 ################################################################################ 95 # jaccesswalker 96 97 define SetupWalker 98 # Parameter 1 File name suffix 99 # Parameter 2 ACCESSBRIDGE_ARCH_ -D suffix 100 101 $$(eval $$(call SetupNativeCompilation, BUILD_JACCESSWALKER$1, \ 102 NAME := jaccesswalker$1, \ 103 TYPE := EXECUTABLE, \ 104 SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \ 105 $(TOPDIR)/toolscommon $(TOPDIR)/bridge, \ 106 CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \ 107 LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \ 108 LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \ 109 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jaccesswalker$1, \ 110 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \ 111 VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \ 112 RC_FLAGS := $$(RC_FLAGS) \ 113 -D "JDK_FNAME=jaccesswalker$1.exe" \ 114 -D "JDK_INTERNAL_NAME=jaccesswalker$1" \ 115 -D "JDK_FTYPE=0x01L", \ 116 )) 117 118 TARGETS += $$(BUILD_JACCESSWALKER$1) 119 120 endef 121 122 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) 123 $(eval $(call SetupInspector,-32,32)) 124 $(eval $(call SetupWalker,-32,32)) 125 $(eval $(call SetupInspector,,LEGACY)) 126 $(eval $(call SetupWalker,,LEGACY)) 127 else 128 $(eval $(call SetupInspector,,64)) 129 $(eval $(call SetupWalker,,64)) 130 endif 131 132 endif 133 134 ################################################################################