author | katleman |
Thu, 17 Apr 2014 10:14:07 -0700 | |
changeset 23965 | 987510c49ac7 |
parent 23607 | e019220f8ee8 |
child 24699 | 3ca47cd995d3 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
2 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
13164 | 26 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
27 |
||
20547 | 28 |
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \ |
29 |
LIBRARY := AppleScriptEngine, \ |
|
30 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
31 |
SRC := $(JDK_TOPDIR)/src/macosx/native/apple/applescript, \ |
|
32 |
LANG := C, \ |
|
33 |
OPTIMIZATION := LOW, \ |
|
34 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
35 |
-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \ |
|
36 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
|
37 |
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ |
|
38 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
39 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
40 |
LDFLAGS_SUFFIX := -framework Cocoa \ |
|
41 |
-framework Carbon \ |
|
42 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
|
43 |
-framework JavaNativeFoundation \ |
|
44 |
$(LDFLAGS_JDKLIB_SUFFIX), \ |
|
45 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \ |
|
46 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
47 |
||
48 |
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA) |
|
49 |
||
50 |
BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE) |
|
13164 | 51 |
|
52 |
endif |
|
53 |
||
54 |
########################################################################################## |
|
55 |
||
56 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
57 |
||
20547 | 58 |
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \ |
59 |
LIBRARY := osxapp, \ |
|
60 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
61 |
SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \ |
|
62 |
LANG := C, \ |
|
63 |
OPTIMIZATION := LOW, \ |
|
64 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
65 |
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ |
|
22957
99352a8b3052
8034173: Move JavaApp.icns to proper place in make/data
erikj
parents:
22951
diff
changeset
|
66 |
-I$(JDK_OUTPUTDIR)/gensrc_headers_icons \ |
20547 | 67 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
68 |
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ |
|
69 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
70 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
71 |
LDFLAGS_SUFFIX_macosx := \ |
|
72 |
-framework Accelerate \ |
|
73 |
-framework ApplicationServices \ |
|
74 |
-framework AudioToolbox \ |
|
75 |
-framework Carbon \ |
|
76 |
-framework Cocoa \ |
|
77 |
-framework Security \ |
|
78 |
-framework ExceptionHandling \ |
|
79 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
|
80 |
-framework JavaNativeFoundation \ |
|
81 |
-framework JavaRuntimeSupport \ |
|
82 |
-framework OpenGL \ |
|
83 |
-framework IOSurface \ |
|
84 |
-framework QuartzCore, \ |
|
85 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \ |
|
86 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
87 |
||
88 |
BUILD_LIBRARIES += $(BUILD_LIBOSXAPP) |
|
89 |
||
90 |
endif |
|
91 |
||
92 |
########################################################################################## |
|
93 |
||
94 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
95 |
||
96 |
LIBOSX_DIRS := \ |
|
97 |
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \ |
|
98 |
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \ |
|
99 |
$(JDK_TOPDIR)/src/macosx/native/apple/security \ |
|
100 |
$(JDK_TOPDIR)/src/macosx/native/apple/launcher |
|
101 |
||
102 |
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \ |
|
103 |
LIBRARY := osx, \ |
|
104 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
105 |
SRC := $(LIBOSX_DIRS), \ |
|
106 |
LANG := C, \ |
|
107 |
OPTIMIZATION := LOW, \ |
|
108 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
109 |
$(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \ |
|
110 |
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ |
|
111 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
|
112 |
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ |
|
113 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
114 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
115 |
LDFLAGS_SUFFIX_macosx := \ |
|
116 |
-losxapp \ |
|
117 |
-framework Cocoa \ |
|
118 |
-framework ApplicationServices \ |
|
119 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
|
120 |
-framework JavaNativeFoundation \ |
|
121 |
-framework JavaRuntimeSupport \ |
|
122 |
-framework Security \ |
|
123 |
-framework SystemConfiguration \ |
|
124 |
$(LDFLAGS_JDKLIB_SUFFIX), \ |
|
125 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \ |
|
126 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
127 |
||
128 |
BUILD_LIBRARIES += $(BUILD_LIBOSX) |
|
129 |
||
130 |
$(BUILD_LIBOSX): $(BUILD_LIBOSXAPP) |
|
131 |
||
132 |
$(BUILD_LIBOSX): $(BUILD_LIBJAVA) |
|
133 |
||
134 |
endif |
|
135 |
||
136 |
########################################################################################## |
|
137 |
||
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
138 |
ifndef OPENJDK |
20547 | 139 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
140 |
||
141 |
ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge |
|
142 |
||
143 |
define SetupAccessBridge |
|
144 |
# Parameter 1 Suffix |
|
145 |
# Parameter 2 Machine |
|
146 |
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix |
|
147 |
||
148 |
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \ |
|
149 |
LIBRARY = JAWTAccessBridge$1, \ |
|
150 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
151 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
152 |
INCLUDE_FILES := JAWTAccessBridge.cpp, \ |
|
153 |
LANG := C++, \ |
|
154 |
OPTIMIZATION := LOW, \ |
|
155 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
156 |
-DACCESSBRIDGE_ARCH_$3, \ |
|
157 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
158 |
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
159 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
160 |
-subsystem:windows -machine:$2 \ |
|
161 |
-def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \ |
|
162 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
163 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
164 |
-D "JDK_FNAME=JAWTAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
165 |
-D "JDK_INTERNAL_NAME=JAWTAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
166 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 167 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \ |
168 |
DEBUG_SYMBOLS := true) |
|
169 |
||
170 |
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) |
|
171 |
||
172 |
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \ |
|
173 |
LIBRARY = JavaAccessBridge$1, \ |
|
174 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
175 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
176 |
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \ |
|
177 |
AccessBridgeJavaEntryPoints.cpp \ |
|
178 |
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \ |
|
179 |
LANG := C++, \ |
|
180 |
OPTIMIZATION := LOW, \ |
|
181 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
182 |
-DACCESSBRIDGE_ARCH_$3, \ |
|
183 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
184 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
185 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
186 |
-subsystem:windows -machine:$2 \ |
|
187 |
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \ |
|
188 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
189 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
190 |
-D "JDK_FNAME=JavaAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
191 |
-D "JDK_INTERNAL_NAME=JavaAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
192 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 193 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \ |
194 |
DEBUG_SYMBOLS := true) |
|
195 |
||
196 |
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \ |
|
197 |
LIBRARY = WindowsAccessBridge$1, \ |
|
198 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
199 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
200 |
INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \ |
|
201 |
AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \ |
|
202 |
WinAccessBridge.cpp AccessBridgeDebug.cpp \ |
|
203 |
AccessBridgeEventHandler.cpp, \ |
|
204 |
LANG := C++, \ |
|
205 |
OPTIMIZATION := LOW, \ |
|
206 |
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \ |
|
207 |
-DACCESSBRIDGE_ARCH_$3, \ |
|
208 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
209 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
210 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
211 |
-subsystem:windows -machine:$2 \ |
|
212 |
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \ |
|
213 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
214 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
215 |
-D "JDK_FNAME=WindowsAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
216 |
-D "JDK_INTERNAL_NAME=WindowsAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
217 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 218 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \ |
219 |
DEBUG_SYMBOLS := true) |
|
220 |
||
221 |
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \ |
|
222 |
$$(BUILD_WINDOWSACCESSBRIDGE$1) |
|
223 |
||
224 |
endef |
|
225 |
||
226 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
227 |
$(eval $(call SetupAccessBridge,-32,I386,32)) |
|
228 |
$(eval $(call SetupAccessBridge,,I386,LEGACY)) |
|
229 |
else |
|
230 |
$(eval $(call SetupAccessBridge,-64,X64,64)) |
|
231 |
endif |
|
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
232 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
233 |
endif |