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 LibCommon.gmk 27 28 ################################################################################ 29 30 ifeq ($(OPENJDK_TARGET_OS), windows) 31 32 ROOT_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native 33 34 define SetupJavaDLL 35 # Parameter 1 Suffix 36 # Parameter 2 ACCESSBRIDGE_ARCH_ suffix 37 38 $(call SetupJdkLibrary, BUILD_JAVAACCESSBRIDGE$1, \ 39 NAME := javaaccessbridge$1, \ 40 SRC := libjavaaccessbridge, \ 41 EXTRA_SRC := common, \ 42 OPTIMIZATION := LOW, \ 43 DISABLED_WARNINGS_microsoft := 4311 4302 4312, \ 44 CFLAGS := $(CFLAGS_JDKLIB) \ 45 -DACCESSBRIDGE_ARCH_$2, \ 46 EXTRA_HEADER_DIRS := \ 47 include/bridge \ 48 java.base:include \ 49 java.desktop:include, \ 50 LDFLAGS := $(LDFLAGS_JDKLIB), \ 51 LIBS := kernel32.lib user32.lib gdi32.lib \ 52 winspool.lib comdlg32.lib advapi32.lib shell32.lib \ 53 $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \ 54 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \ 55 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ 56 ) 57 58 $$(BUILD_JAVAACCESSBRIDGE$1): $(call FindStaticLib, java.desktop, jawt, /libjawt) 59 60 TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1) 61 endef 62 63 define SetupWinDLL 64 # Parameter 1 Suffix 65 # Parameter 2 ACCESSBRIDGE_ARCH_ suffix 66 $(call SetupJdkLibrary, BUILD_WINDOWSACCESSBRIDGE$1, \ 67 NAME := windowsaccessbridge$1, \ 68 SRC := libwindowsaccessbridge, \ 69 EXTRA_SRC := common, \ 70 OPTIMIZATION := LOW, \ 71 DISABLED_WARNINGS_microsoft := 4311 4302 4312, \ 72 CFLAGS := $(CFLAGS_JDKLIB) \ 73 -DACCESSBRIDGE_ARCH_$2, \ 74 EXTRA_HEADER_DIRS := \ 75 include/bridge \ 76 java.base:include, \ 77 LDFLAGS := $(LDFLAGS_JDKLIB) \ 78 -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \ 79 LIBS := kernel32.lib user32.lib gdi32.lib \ 80 winspool.lib comdlg32.lib advapi32.lib shell32.lib \ 81 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \ 82 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ 83 ) 84 85 TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1) 86 87 endef 88 89 define SetupAccessBridgeSysInfo 90 91 $(call SetupJdkLibrary, BUILD_ACCESSBRIDGESYSINFO, \ 92 NAME := jabsysinfo, \ 93 OPTIMIZATION := LOW, \ 94 CFLAGS := $(CFLAGS_JDKLIB), \ 95 LDFLAGS := $(LDFLAGS_JDKLIB), \ 96 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ 97 ) 98 99 TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO) 100 101 endef 102 103 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) 104 $(eval $(call SetupAccessBridgeSysInfo)) 105 $(eval $(call SetupJavaDLL,-32,32)) 106 $(eval $(call SetupJavaDLL,,LEGACY)) 107 $(eval $(call SetupWinDLL,-32,32)) 108 $(eval $(call SetupWinDLL,,LEGACY)) 109 else 110 $(eval $(call SetupJavaDLL,,64)) 111 $(eval $(call SetupWinDLL,-64,64)) 112 endif 113 114 endif 115 116 ################################################################################