author | alanb |
Tue, 11 Feb 2014 09:59:34 +0000 | |
changeset 22951 | 5fd21112b2b6 |
parent 22607 | ba232b417248 |
child 22957 | 99352a8b3052 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
16476
e269be167fae
8001334: Remove use of JVM_* functions from java.io code
dxu
parents:
15676
diff
changeset
|
2 |
# Copyright (c) 2011, 2013, 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 \ |
|
66 |
-I$(JDK_OUTPUTDIR)/gensrc/sun/osxapp \ |
|
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, \ |
|
163 |
RC_FLAGS := $(RC_FLAGS), \ |
|
164 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \ |
|
165 |
DEBUG_SYMBOLS := true) |
|
166 |
||
167 |
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) |
|
168 |
||
169 |
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \ |
|
170 |
LIBRARY = JavaAccessBridge$1, \ |
|
171 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
172 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
173 |
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \ |
|
174 |
AccessBridgeJavaEntryPoints.cpp \ |
|
175 |
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \ |
|
176 |
LANG := C++, \ |
|
177 |
OPTIMIZATION := LOW, \ |
|
178 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
179 |
-DACCESSBRIDGE_ARCH_$3, \ |
|
180 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
181 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
182 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
183 |
-subsystem:windows -machine:$2 \ |
|
184 |
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \ |
|
185 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
186 |
RC_FLAGS := $(RC_FLAGS), \ |
|
187 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \ |
|
188 |
DEBUG_SYMBOLS := true) |
|
189 |
||
190 |
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \ |
|
191 |
LIBRARY = WindowsAccessBridge$1, \ |
|
192 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
193 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
194 |
INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \ |
|
195 |
AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \ |
|
196 |
WinAccessBridge.cpp AccessBridgeDebug.cpp \ |
|
197 |
AccessBridgeEventHandler.cpp, \ |
|
198 |
LANG := C++, \ |
|
199 |
OPTIMIZATION := LOW, \ |
|
200 |
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \ |
|
201 |
-DACCESSBRIDGE_ARCH_$3, \ |
|
202 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
|
203 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
204 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
205 |
-subsystem:windows -machine:$2 \ |
|
206 |
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \ |
|
207 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
208 |
RC_FLAGS := $(RC_FLAGS), \ |
|
209 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \ |
|
210 |
DEBUG_SYMBOLS := true) |
|
211 |
||
212 |
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \ |
|
213 |
$$(BUILD_WINDOWSACCESSBRIDGE$1) |
|
214 |
||
215 |
endef |
|
216 |
||
217 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
218 |
$(eval $(call SetupAccessBridge,-32,I386,32)) |
|
219 |
$(eval $(call SetupAccessBridge,,I386,LEGACY)) |
|
220 |
else |
|
221 |
$(eval $(call SetupAccessBridge,-64,X64,64)) |
|
222 |
endif |
|
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
223 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
224 |
endif |