2015-03-27 21:13:45 +00:00
|
|
|
#
|
2016-11-02 16:44:01 +00:00
|
|
|
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
2015-03-27 21:13:45 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation. Oracle designates this
|
|
|
|
# particular file as subject to the "Classpath" exception as provided
|
|
|
|
# by Oracle in the LICENSE file that accompanied this code.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
|
|
|
include LibCommon.gmk
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
|
|
|
|
2017-09-12 17:03:56 +00:00
|
|
|
ROOT_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
|
2015-03-27 21:13:45 +00:00
|
|
|
JAVA_AB_SRCDIR := $(ROOT_SRCDIR)/libjavaaccessbridge $(ROOT_SRCDIR)/common
|
|
|
|
WIN_AB_SRCDIR := $(ROOT_SRCDIR)/libwindowsaccessbridge $(ROOT_SRCDIR)/common
|
|
|
|
SYSINFO_SRCDIR := $(ROOT_SRCDIR)/libjabsysinfo
|
|
|
|
ACCESSBRIDGE_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \
|
2017-09-12 17:03:56 +00:00
|
|
|
-I$(TOPDIR)/src/java.desktop/windows/native/include \
|
|
|
|
-I$(TOPDIR)/src/java.desktop/share/native/include
|
2015-03-27 21:13:45 +00:00
|
|
|
|
|
|
|
define SetupJavaDLL
|
|
|
|
# Parameter 1 Suffix
|
|
|
|
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
|
|
|
|
|
|
|
|
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
|
|
|
|
LIBRARY = javaaccessbridge$1, \
|
|
|
|
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
|
|
|
SRC := $(JAVA_AB_SRCDIR), \
|
|
|
|
OPTIMIZATION := LOW, \
|
|
|
|
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
|
|
|
|
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
|
2016-11-02 16:44:01 +00:00
|
|
|
-I$(ROOT_SRCDIR)/include/bridge \
|
2015-03-27 21:13:45 +00:00
|
|
|
-DACCESSBRIDGE_ARCH_$2, \
|
2015-10-29 15:31:00 +00:00
|
|
|
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows, \
|
|
|
|
LIBS := kernel32.lib user32.lib gdi32.lib \
|
2015-03-27 21:13:45 +00:00
|
|
|
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
|
|
|
|
$(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
|
2015-10-29 15:31:00 +00:00
|
|
|
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
|
2015-03-27 21:13:45 +00:00
|
|
|
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
|
|
|
RC_FLAGS := $(RC_FLAGS) \
|
|
|
|
-D "JDK_FNAME=javaaccessbridge$1.dll" \
|
|
|
|
-D "JDK_INTERNAL_NAME=javaaccessbridge$1" \
|
|
|
|
-D "JDK_FTYPE=0x02L", \
|
|
|
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \
|
2016-01-20 08:54:13 +00:00
|
|
|
)
|
2015-03-27 21:13:45 +00:00
|
|
|
|
|
|
|
$$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib
|
|
|
|
|
|
|
|
TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SetupWinDLL
|
|
|
|
# Parameter 1 Suffix
|
|
|
|
# Parameter 2 ACCESSBRIDGE_ARCH_ suffix
|
|
|
|
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
|
|
|
|
LIBRARY = windowsaccessbridge$1, \
|
|
|
|
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
|
|
|
SRC := $(WIN_AB_SRCDIR), \
|
|
|
|
OPTIMIZATION := LOW, \
|
|
|
|
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
|
|
|
|
$(addprefix -I,$(WIN_AB_SRCDIR)) \
|
2016-11-02 16:44:01 +00:00
|
|
|
-I$(ROOT_SRCDIR)/include/bridge \
|
2015-03-27 21:13:45 +00:00
|
|
|
-DACCESSBRIDGE_ARCH_$2, \
|
2015-10-29 15:31:00 +00:00
|
|
|
LDFLAGS := $(LDFLAGS_JDKLIB) -subsystem:windows \
|
2015-03-27 21:13:45 +00:00
|
|
|
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
|
2015-10-29 15:31:00 +00:00
|
|
|
LIBS := kernel32.lib user32.lib gdi32.lib \
|
|
|
|
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
|
|
|
|
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
|
2015-03-27 21:13:45 +00:00
|
|
|
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
|
|
|
RC_FLAGS := $(RC_FLAGS) \
|
|
|
|
-D "JDK_FNAME=windowsaccessbridge$1.dll" \
|
|
|
|
-D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \
|
|
|
|
-D "JDK_FTYPE=0x02L", \
|
|
|
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \
|
2016-01-20 08:54:13 +00:00
|
|
|
)
|
2015-03-27 21:13:45 +00:00
|
|
|
|
|
|
|
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SetupAccessBridgeSysInfo
|
|
|
|
|
|
|
|
$(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \
|
|
|
|
LIBRARY = jabsysinfo, \
|
|
|
|
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
|
|
|
|
SRC := $(SYSINFO_SRCDIR), \
|
|
|
|
OPTIMIZATION := LOW, \
|
|
|
|
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \
|
|
|
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
|
|
|
-subsystem:windows -machine:I386, \
|
|
|
|
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
|
|
|
|
RC_FLAGS := $(RC_FLAGS) \
|
|
|
|
-D "JDK_FNAME=jabsysinfo.dll" \
|
|
|
|
-D "JDK_INTERNAL_NAME=jabsysinfo" \
|
|
|
|
-D "JDK_FTYPE=0x02L", \
|
|
|
|
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \
|
2016-01-20 08:54:13 +00:00
|
|
|
)
|
2015-03-27 21:13:45 +00:00
|
|
|
|
|
|
|
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
|
|
|
$(eval $(call SetupAccessBridgeSysInfo))
|
|
|
|
$(eval $(call SetupJavaDLL,-32,32))
|
|
|
|
$(eval $(call SetupJavaDLL,,LEGACY))
|
|
|
|
$(eval $(call SetupWinDLL,-32,32))
|
|
|
|
$(eval $(call SetupWinDLL,,LEGACY))
|
|
|
|
else
|
|
|
|
$(eval $(call SetupJavaDLL,,64))
|
|
|
|
$(eval $(call SetupWinDLL,-64,64))
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|