author | ddehaven |
Wed, 18 Jun 2014 12:52:14 -0700 | |
changeset 25086 | f5f41ed620d5 |
parent 24699 | 3ca47cd995d3 |
child 25780 | 9ece64e7ca1a |
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) \ |
|
25086
f5f41ed620d5
8043340: [macosx] Fix hard-wired paths to JavaVM.framework
ddehaven
parents:
24699
diff
changeset
|
35 |
-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript, \ |
20547 | 36 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
37 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
38 |
LDFLAGS_SUFFIX := -framework Cocoa \ |
|
39 |
-framework Carbon \ |
|
40 |
-framework JavaNativeFoundation \ |
|
41 |
$(LDFLAGS_JDKLIB_SUFFIX), \ |
|
42 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \ |
|
43 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
44 |
||
45 |
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA) |
|
46 |
||
47 |
BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE) |
|
13164 | 48 |
|
49 |
endif |
|
50 |
||
51 |
########################################################################################## |
|
52 |
||
53 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
54 |
||
20547 | 55 |
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \ |
56 |
LIBRARY := osxapp, \ |
|
57 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
58 |
SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \ |
|
59 |
LANG := C, \ |
|
60 |
OPTIMIZATION := LOW, \ |
|
61 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
62 |
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ |
|
25086
f5f41ed620d5
8043340: [macosx] Fix hard-wired paths to JavaVM.framework
ddehaven
parents:
24699
diff
changeset
|
63 |
-I$(JDK_OUTPUTDIR)/gensrc_headers_icons, \ |
20547 | 64 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
65 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
66 |
LDFLAGS_SUFFIX_macosx := \ |
|
67 |
-framework Accelerate \ |
|
68 |
-framework ApplicationServices \ |
|
69 |
-framework AudioToolbox \ |
|
70 |
-framework Carbon \ |
|
71 |
-framework Cocoa \ |
|
72 |
-framework Security \ |
|
73 |
-framework ExceptionHandling \ |
|
74 |
-framework JavaNativeFoundation \ |
|
75 |
-framework JavaRuntimeSupport \ |
|
76 |
-framework OpenGL \ |
|
77 |
-framework IOSurface \ |
|
78 |
-framework QuartzCore, \ |
|
79 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \ |
|
80 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
81 |
||
82 |
BUILD_LIBRARIES += $(BUILD_LIBOSXAPP) |
|
83 |
||
84 |
endif |
|
85 |
||
86 |
########################################################################################## |
|
87 |
||
88 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
89 |
||
90 |
LIBOSX_DIRS := \ |
|
91 |
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \ |
|
92 |
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \ |
|
93 |
$(JDK_TOPDIR)/src/macosx/native/apple/security \ |
|
94 |
$(JDK_TOPDIR)/src/macosx/native/apple/launcher |
|
95 |
||
96 |
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \ |
|
97 |
LIBRARY := osx, \ |
|
98 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
99 |
SRC := $(LIBOSX_DIRS), \ |
|
100 |
LANG := C, \ |
|
101 |
OPTIMIZATION := LOW, \ |
|
102 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
103 |
$(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \ |
|
25086
f5f41ed620d5
8043340: [macosx] Fix hard-wired paths to JavaVM.framework
ddehaven
parents:
24699
diff
changeset
|
104 |
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \ |
20547 | 105 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
106 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
107 |
LDFLAGS_SUFFIX_macosx := \ |
|
108 |
-losxapp \ |
|
109 |
-framework Cocoa \ |
|
110 |
-framework ApplicationServices \ |
|
111 |
-framework JavaNativeFoundation \ |
|
112 |
-framework JavaRuntimeSupport \ |
|
113 |
-framework Security \ |
|
114 |
-framework SystemConfiguration \ |
|
115 |
$(LDFLAGS_JDKLIB_SUFFIX), \ |
|
116 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \ |
|
117 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
118 |
||
119 |
BUILD_LIBRARIES += $(BUILD_LIBOSX) |
|
120 |
||
121 |
$(BUILD_LIBOSX): $(BUILD_LIBOSXAPP) |
|
122 |
||
123 |
$(BUILD_LIBOSX): $(BUILD_LIBJAVA) |
|
124 |
||
125 |
endif |
|
126 |
||
127 |
########################################################################################## |
|
128 |
||
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
129 |
ifndef OPENJDK |
20547 | 130 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
131 |
||
132 |
ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge |
|
133 |
||
134 |
define SetupAccessBridge |
|
135 |
# Parameter 1 Suffix |
|
136 |
# Parameter 2 Machine |
|
24699 | 137 |
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix and name of directory where gensrc headers |
138 |
# are found. |
|
20547 | 139 |
|
140 |
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \ |
|
141 |
LIBRARY = JAWTAccessBridge$1, \ |
|
142 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
143 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
144 |
INCLUDE_FILES := JAWTAccessBridge.cpp, \ |
|
145 |
LANG := C++, \ |
|
146 |
OPTIMIZATION := LOW, \ |
|
147 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
24699 | 148 |
-DACCESSBRIDGE_ARCH_$3 \ |
149 |
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \ |
|
20547 | 150 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
151 |
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
152 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
153 |
-subsystem:windows -machine:$2 \ |
|
154 |
-def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \ |
|
155 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
156 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
157 |
-D "JDK_FNAME=JAWTAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
158 |
-D "JDK_INTERNAL_NAME=JAWTAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
159 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 160 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \ |
161 |
DEBUG_SYMBOLS := true) |
|
162 |
||
163 |
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX) |
|
164 |
||
165 |
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \ |
|
166 |
LIBRARY = JavaAccessBridge$1, \ |
|
167 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
168 |
SRC := $(ACCESSBRIDGE_SRCDIR), \ |
|
169 |
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \ |
|
170 |
AccessBridgeJavaEntryPoints.cpp \ |
|
171 |
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \ |
|
172 |
LANG := C++, \ |
|
173 |
OPTIMIZATION := LOW, \ |
|
174 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
24699 | 175 |
-DACCESSBRIDGE_ARCH_$3 \ |
176 |
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \ |
|
20547 | 177 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
178 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
179 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
180 |
-subsystem:windows -machine:$2 \ |
|
181 |
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \ |
|
182 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
183 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
184 |
-D "JDK_FNAME=JavaAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
185 |
-D "JDK_INTERNAL_NAME=JavaAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
186 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 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 \ |
|
24699 | 201 |
-DACCESSBRIDGE_ARCH_$3 \ |
202 |
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \ |
|
20547 | 203 |
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ |
204 |
winspool.lib comdlg32.lib advapi32.lib shell32.lib \ |
|
205 |
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ |
|
206 |
-subsystem:windows -machine:$2 \ |
|
207 |
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \ |
|
208 |
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \ |
|
23607
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
209 |
RC_FLAGS := $(RC_FLAGS) \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
210 |
-D "JDK_FNAME=WindowsAccessBridge$1.dll" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
211 |
-D "JDK_INTERNAL_NAME=WindowsAccessBridge$1" \ |
e019220f8ee8
8032443: Java Access Bridge version strings need to be fixed
ptbrunet
parents:
22957
diff
changeset
|
212 |
-D "JDK_FTYPE=0x02L", \ |
20547 | 213 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \ |
214 |
DEBUG_SYMBOLS := true) |
|
215 |
||
216 |
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \ |
|
217 |
$$(BUILD_WINDOWSACCESSBRIDGE$1) |
|
218 |
||
219 |
endef |
|
220 |
||
221 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
222 |
$(eval $(call SetupAccessBridge,-32,I386,32)) |
|
24699 | 223 |
$(eval $(call SetupAccessBridge,,I386,legacy)) |
20547 | 224 |
else |
225 |
$(eval $(call SetupAccessBridge,-64,X64,64)) |
|
226 |
endif |
|
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
227 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14855
diff
changeset
|
228 |
endif |