|
1 # |
|
2 # Copyright (c) 2014, 2015, 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 := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native |
|
33 JAVA_AB_SRCDIR := $(ROOT_SRCDIR)/libjavaaccessbridge $(ROOT_SRCDIR)/common |
|
34 WIN_AB_SRCDIR := $(ROOT_SRCDIR)/libwindowsaccessbridge $(ROOT_SRCDIR)/common |
|
35 SYSINFO_SRCDIR := $(ROOT_SRCDIR)/libjabsysinfo |
|
36 ACCESSBRIDGE_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \ |
|
37 -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \ |
|
38 -I$(JDK_TOPDIR)/src/java.desktop/share/native/include |
|
39 |
|
40 define SetupJavaDLL |
|
41 # Parameter 1 Suffix |
|
42 # Parameter 2 ACCESSBRIDGE_ARCH_ suffix |
|
43 |
|
44 $(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \ |
|
45 LIBRARY = javaaccessbridge$1, \ |
|
46 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
47 SRC := $(JAVA_AB_SRCDIR), \ |
|
48 LANG := C++, \ |
|
49 OPTIMIZATION := LOW, \ |
|
50 CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \ |
|
51 $(addprefix -I,$(JAVA_AB_SRCDIR)) \ |
|
52 -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \ |
|
53 -DACCESSBRIDGE_ARCH_$2, \ |
|
54 LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
55 winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
56 $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \ |
|
57 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
58 -subsystem:windows, \ |
|
59 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ |
|
60 RC_FLAGS := $(RC_FLAGS) \ |
|
61 -D "JDK_FNAME=javaaccessbridge$1.dll" \ |
|
62 -D "JDK_INTERNAL_NAME=javaaccessbridge$1" \ |
|
63 -D "JDK_FTYPE=0x02L", \ |
|
64 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \ |
|
65 DEBUG_SYMBOLS := true) |
|
66 |
|
67 $$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib |
|
68 |
|
69 TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1) |
|
70 endef |
|
71 |
|
72 define SetupWinDLL |
|
73 # Parameter 1 Suffix |
|
74 # Parameter 2 ACCESSBRIDGE_ARCH_ suffix |
|
75 $(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \ |
|
76 LIBRARY = windowsaccessbridge$1, \ |
|
77 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
78 SRC := $(WIN_AB_SRCDIR), \ |
|
79 LANG := C++, \ |
|
80 OPTIMIZATION := LOW, \ |
|
81 CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \ |
|
82 $(addprefix -I,$(WIN_AB_SRCDIR)) \ |
|
83 -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \ |
|
84 -DACCESSBRIDGE_ARCH_$2, \ |
|
85 LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
86 winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
87 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
88 -subsystem:windows \ |
|
89 -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \ |
|
90 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ |
|
91 RC_FLAGS := $(RC_FLAGS) \ |
|
92 -D "JDK_FNAME=windowsaccessbridge$1.dll" \ |
|
93 -D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \ |
|
94 -D "JDK_FTYPE=0x02L", \ |
|
95 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \ |
|
96 DEBUG_SYMBOLS := true) |
|
97 |
|
98 TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1) |
|
99 |
|
100 endef |
|
101 |
|
102 define SetupAccessBridgeSysInfo |
|
103 |
|
104 $(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \ |
|
105 LIBRARY = jabsysinfo, \ |
|
106 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
107 SRC := $(SYSINFO_SRCDIR), \ |
|
108 LANG := C++, \ |
|
109 OPTIMIZATION := LOW, \ |
|
110 CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \ |
|
111 LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
112 -subsystem:windows -machine:I386, \ |
|
113 VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ |
|
114 RC_FLAGS := $(RC_FLAGS) \ |
|
115 -D "JDK_FNAME=jabsysinfo.dll" \ |
|
116 -D "JDK_INTERNAL_NAME=jabsysinfo" \ |
|
117 -D "JDK_FTYPE=0x02L", \ |
|
118 OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \ |
|
119 DEBUG_SYMBOLS := true) |
|
120 |
|
121 TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO) |
|
122 |
|
123 endef |
|
124 |
|
125 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
126 $(eval $(call SetupAccessBridgeSysInfo)) |
|
127 $(eval $(call SetupJavaDLL,-32,32)) |
|
128 $(eval $(call SetupJavaDLL,,LEGACY)) |
|
129 $(eval $(call SetupWinDLL,-32,32)) |
|
130 $(eval $(call SetupWinDLL,,LEGACY)) |
|
131 else |
|
132 $(eval $(call SetupJavaDLL,,64)) |
|
133 $(eval $(call SetupWinDLL,-64,64)) |
|
134 endif |
|
135 |
|
136 endif |
|
137 |
|
138 ################################################################################ |