author | prr |
Thu, 10 Apr 2008 16:28:45 -0700 | |
changeset 539 | 7952521a4ad3 |
parent 2 | 90ce3da70b43 |
child 715 | f16baef3a20e |
permissions | -rw-r--r-- |
2 | 1 |
# |
2 |
# Copyright 2007 Sun Microsystems, Inc. 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. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
24 |
# |
|
25 |
||
26 |
######################################################################## |
|
27 |
||
28 |
# Definitions for openjdk plugs (used by both import and export) |
|
29 |
||
30 |
# Names of native shared libraries |
|
31 |
||
32 |
PLUG_JSOUND_LIBRARY=$(LIB_PREFIX)jsoundhs.$(LIBRARY_SUFFIX) |
|
33 |
PLUG_LIBRARY_NAMES = \ |
|
34 |
$(PLUG_JSOUND_LIBRARY) |
|
35 |
||
36 |
# Sub-directory where native shared libraries are located (e.g. jre/bin or...) |
|
37 |
||
38 |
PLUG_LOCATION_SUBDIR=$(ARCH_VM_SUBDIR) |
|
39 |
||
40 |
# Explicit classfile lists |
|
41 |
||
42 |
# WARNING: These classlists will not work with pattern rules, only used in |
|
43 |
# shell commands. |
|
44 |
# The \$$ patterns will fail in pattern rules, which want $$, |
|
45 |
# but the $$ fails in shell commands. |
|
46 |
# The shell commands are more important. |
|
47 |
# Also, the $1 pattern in these names causes problems with the |
|
48 |
# GNU make define feature, so you can't use these in define's. |
|
49 |
||
50 |
PLUG_JMF_CLASS_NAMES = \ |
|
51 |
com/sun/jmx/snmp/SnmpDataTypeEnums.class \ |
|
52 |
com/sun/jmx/snmp/SnmpDefinitions.class \ |
|
53 |
com/sun/jmx/snmp/SnmpOid.class \ |
|
54 |
com/sun/jmx/snmp/SnmpOidDatabase.class \ |
|
55 |
com/sun/jmx/snmp/SnmpOidDatabaseSupport.class \ |
|
56 |
com/sun/jmx/snmp/SnmpOidRecord.class \ |
|
57 |
com/sun/jmx/snmp/SnmpOidTable.class \ |
|
58 |
com/sun/jmx/snmp/SnmpOidTableSupport.class \ |
|
59 |
com/sun/jmx/snmp/SnmpParameters.class \ |
|
60 |
com/sun/jmx/snmp/SnmpPduPacket.class \ |
|
61 |
com/sun/jmx/snmp/SnmpPeer.class \ |
|
62 |
com/sun/jmx/snmp/SnmpTimeticks.class \ |
|
63 |
com/sun/jmx/snmp/SnmpVarBind.class \ |
|
64 |
com/sun/jmx/snmp/SnmpVarBindList.class \ |
|
65 |
com/sun/jmx/snmp/Timestamp.class \ |
|
66 |
com/sun/jmx/snmp/daemon/SendQ.class \ |
|
67 |
com/sun/jmx/snmp/daemon/SnmpInformRequest.class \ |
|
68 |
com/sun/jmx/snmp/daemon/SnmpQManager.class \ |
|
69 |
com/sun/jmx/snmp/daemon/SnmpRequestCounter.class \ |
|
70 |
com/sun/jmx/snmp/daemon/SnmpResponseHandler.class \ |
|
71 |
com/sun/jmx/snmp/daemon/SnmpSendServer.class \ |
|
72 |
com/sun/jmx/snmp/daemon/SnmpSession.class \ |
|
73 |
com/sun/jmx/snmp/daemon/SnmpSocket.class \ |
|
74 |
com/sun/jmx/snmp/daemon/SnmpTimerServer.class \ |
|
75 |
com/sun/jmx/snmp/daemon/WaitQ.class |
|
76 |
||
77 |
PLUG_SOUND_CLASS_NAMES = \ |
|
78 |
com/sun/media/sound/AbstractPlayer.class \ |
|
79 |
com/sun/media/sound/CircularBuffer.class \ |
|
80 |
com/sun/media/sound/HeadspaceInstrument.class \ |
|
81 |
com/sun/media/sound/HeadspaceMixer\$$1.class \ |
|
82 |
com/sun/media/sound/HeadspaceMixer\$$MidiLine.class \ |
|
83 |
com/sun/media/sound/HeadspaceMixer\$$MidiLineInfo.class \ |
|
84 |
com/sun/media/sound/HeadspaceMixer\$$MixerInfo.class \ |
|
85 |
com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl\$$MixerReverbType.class \ |
|
86 |
com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl.class \ |
|
87 |
com/sun/media/sound/HeadspaceMixer.class \ |
|
88 |
com/sun/media/sound/HeadspaceMixerProvider.class \ |
|
89 |
com/sun/media/sound/HeadspaceSample.class \ |
|
90 |
com/sun/media/sound/HeadspaceSoundbank.class \ |
|
91 |
com/sun/media/sound/HsbParser.class \ |
|
92 |
com/sun/media/sound/MixerClip\$$1.class \ |
|
93 |
com/sun/media/sound/MixerClip\$$MixerClipApplyReverbControl.class \ |
|
94 |
com/sun/media/sound/MixerClip\$$MixerClipGainControl.class \ |
|
95 |
com/sun/media/sound/MixerClip\$$MixerClipMuteControl.class \ |
|
96 |
com/sun/media/sound/MixerClip\$$MixerClipPanControl.class \ |
|
97 |
com/sun/media/sound/MixerClip\$$MixerClipSampleRateControl.class \ |
|
98 |
com/sun/media/sound/MixerClip.class \ |
|
99 |
com/sun/media/sound/MixerMidiChannel.class \ |
|
100 |
com/sun/media/sound/MixerSequencer\$$1.class \ |
|
101 |
com/sun/media/sound/MixerSequencer\$$ControllerVectorElement.class \ |
|
102 |
com/sun/media/sound/MixerSequencer\$$MixerSequencerInfo.class \ |
|
103 |
com/sun/media/sound/MixerSequencer\$$RecordingTrack.class \ |
|
104 |
com/sun/media/sound/MixerSequencer.class \ |
|
105 |
com/sun/media/sound/MixerSequencerProvider.class \ |
|
106 |
com/sun/media/sound/MixerSourceLine\$$1.class \ |
|
107 |
com/sun/media/sound/MixerSourceLine\$$MixerSourceLineApplyReverbControl.class \ |
|
108 |
com/sun/media/sound/MixerSourceLine\$$MixerSourceLineGainControl.class \ |
|
109 |
com/sun/media/sound/MixerSourceLine\$$MixerSourceLineMuteControl.class \ |
|
110 |
com/sun/media/sound/MixerSourceLine\$$MixerSourceLinePanControl.class \ |
|
111 |
com/sun/media/sound/MixerSourceLine\$$MixerSourceLineSampleRateControl.class \ |
|
112 |
com/sun/media/sound/MixerSourceLine.class \ |
|
113 |
com/sun/media/sound/MixerSynth\$$1.class \ |
|
114 |
com/sun/media/sound/MixerSynth\$$MixerSynthInfo.class \ |
|
115 |
com/sun/media/sound/MixerSynth\$$SynthReceiver.class \ |
|
116 |
com/sun/media/sound/MixerSynth.class \ |
|
117 |
com/sun/media/sound/MixerSynthProvider.class \ |
|
118 |
com/sun/media/sound/MixerThread.class \ |
|
119 |
com/sun/media/sound/RmfFileReader.class \ |
|
120 |
com/sun/media/sound/SimpleInputDevice\$$1.class \ |
|
121 |
com/sun/media/sound/SimpleInputDevice\$$InputDeviceDataLine.class \ |
|
122 |
com/sun/media/sound/SimpleInputDevice\$$InputDevicePort.class \ |
|
123 |
com/sun/media/sound/SimpleInputDevice\$$InputDevicePortInfo.class \ |
|
124 |
com/sun/media/sound/SimpleInputDevice.class \ |
|
125 |
com/sun/media/sound/SimpleInputDeviceProvider\$$1.class \ |
|
126 |
com/sun/media/sound/SimpleInputDeviceProvider\$$InputDeviceInfo.class \ |
|
127 |
com/sun/media/sound/SimpleInputDeviceProvider.class |
|
128 |
||
129 |
# Class list temp files (used by both import and export of plugs) |
|
130 |
||
131 |
PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs |
|
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
2
diff
changeset
|
132 |
PLUG_CLASS_AREAS = jmf sound |
2 | 133 |
PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist) |
134 |
||
135 |
# Create jargs file command |
|
136 |
||
137 |
define plug-create-jargs |
|
138 |
@$(prep-target) |
|
139 |
$(SED) -e "s@^@-C $(CLASSDESTDIR) @" $< > $@ |
|
140 |
endef # plug-create-clist-jargs |
|
141 |
||
142 |
# Create clist (class name list) and jargs file (input to jar) |
|
143 |
# Need these files to avoid long command lines which fail on some systems. |
|
144 |
||
145 |
$(PLUG_TEMPDIR)/jmf.clist: |
|
146 |
@$(prep-target) |
|
147 |
@for i in $(PLUG_JMF_CLASS_NAMES) ; do \ |
|
148 |
$(ECHO) "$$i" >> $@; \ |
|
149 |
done |
|
150 |
$(PLUG_TEMPDIR)/sound.clist: |
|
151 |
@$(prep-target) |
|
152 |
@for i in $(PLUG_SOUND_CLASS_NAMES) ; do \ |
|
153 |
$(ECHO) "$$i" >> $@ ; \ |
|
154 |
done |
|
155 |
$(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS) |
|
156 |
@$(prep-target) |
|
157 |
$(CAT) $(PLUG_CLISTS) > $@ |
|
158 |
$(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist |
|
159 |
$(plug-create-jargs) |
|
160 |
$(PLUG_TEMPDIR)/sound.jargs: $(PLUG_TEMPDIR)/sound.clist |
|
161 |
$(plug-create-jargs) |
|
162 |
$(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist |
|
163 |
$(plug-create-jargs) |
|
164 |
||
165 |
# |
|
166 |
# Specific to OPENJDK import of binary plugs |
|
167 |
# |
|
168 |
||
169 |
ifdef OPENJDK |
|
170 |
||
171 |
# Import |
|
172 |
||
173 |
PLUG_IMPORT_DIR=$(BINARY_PLUGS_PATH) |
|
174 |
PLUG_IMPORT_JARFILE=$(BINARY_PLUGS_JARFILE) |
|
175 |
||
176 |
# Import file command |
|
177 |
||
178 |
define import-binary-plug-file |
|
179 |
@$(ECHO) "PLUG IMPORT: $(@F)" |
|
180 |
$(install-file) |
|
181 |
endef # import-binary-plug-file |
|
182 |
||
183 |
# Import classes command |
|
184 |
||
185 |
define import-binary-plug-classes |
|
186 |
@$(MKDIR) -p $(CLASSDESTDIR) |
|
187 |
@$(CAT) $1 | $(SED) -e 's/^/PLUG IMPORT: /' |
|
188 |
($(CD) $(CLASSDESTDIR) && $(BOOT_JAR_CMD) xf $(PLUG_IMPORT_JARFILE) @$1) |
|
189 |
endef # import-binary-plug-classes |
|
190 |
||
191 |
# Import specific area classes (the classes are always created) |
|
192 |
||
193 |
import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist |
|
194 |
$(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist) |
|
195 |
import-binary-plug-sound-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/sound.clist |
|
196 |
$(call import-binary-plug-classes,$(PLUG_TEMPDIR)/sound.clist) |
|
197 |
||
198 |
# Import all classes from the jar file |
|
199 |
||
200 |
import-binary-plug-jar: \ |
|
201 |
import-binary-plug-jmf-classes \ |
|
539
7952521a4ad3
6662775: Move imaging and color classes from closed to open
prr
parents:
2
diff
changeset
|
202 |
import-binary-plug-sound-classes |
2 | 203 |
|
204 |
# Import native libraries |
|
205 |
||
206 |
$(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY): \ |
|
207 |
$(PLUG_IMPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY) |
|
208 |
$(import-binary-plug-file) |
|
209 |
||
210 |
# Rules only used by lower level makefiles |
|
211 |
||
212 |
import-binary-plug-jsound-library: \ |
|
213 |
$(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY) |
|
214 |
||
215 |
# Binary plug start/complete messages |
|
216 |
||
217 |
import-binary-plugs-started: |
|
218 |
@$(ECHO) "BinaryPlugs import started: `date`" |
|
219 |
@$(ECHO) "BINARY_PLUGS_PATH=$(BINARY_PLUGS_PATH)" |
|
220 |
import-binary-plugs-completed: |
|
221 |
@$(ECHO) "BinaryPlugs import completed: `date`" |
|
222 |
||
223 |
# Import lib files (only if they don't exist already) |
|
224 |
||
225 |
import-binary-plugs-libs: \ |
|
226 |
$(PLUG_LIBRARY_NAMES:%=$(LIB_LOCATION)/%) |
|
227 |
||
228 |
# Import everything |
|
229 |
||
230 |
import-binary-plugs: \ |
|
231 |
import-binary-plugs-started \ |
|
232 |
import-binary-plugs-libs \ |
|
233 |
import-binary-plug-jar \ |
|
234 |
import-binary-plugs-completed |
|
235 |
||
236 |
# All these targets are phony (no filenames) |
|
237 |
||
238 |
.PHONY: import-binary-plugs-started \ |
|
239 |
import-binary-plugs-completed \ |
|
240 |
import-binary-plugs-libs \ |
|
241 |
import-binary-plugs \ |
|
242 |
import-binary-plug-jar \ |
|
243 |
import-binary-plug-jmf-classes \ |
|
244 |
import-binary-plug-sound-classes \ |
|
245 |
import-binary-plug-jsound-library |
|
246 |
||
247 |
else # !OPENJDK |
|
248 |
||
249 |
# |
|
250 |
# Specific to exporting binary plugs for OPENJDK (e.g. OPENJDK is NOT defined) |
|
251 |
# |
|
252 |
||
253 |
# Export names (See make/common/Defs.gmk for BINARY_PLUGS_JARNAME definition) |
|
254 |
||
255 |
PLUG_EXPORT_DIRNAME=openjdk-binary-plugs-image |
|
256 |
PLUG_EXPORT_DIR=$(OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME) |
|
257 |
PLUG_EXPORT_JARFILE=$(PLUG_EXPORT_DIR)/jre/lib/$(BINARY_PLUGS_JARNAME) |
|
258 |
||
259 |
# Export file command |
|
260 |
||
261 |
define export-binary-plug-file |
|
262 |
@$(ECHO) "PLUG EXPORT: $(@F)" |
|
263 |
$(install-file) |
|
264 |
endef # export-binary-plug-file |
|
265 |
||
266 |
# OpenJDK Binary Plug License |
|
267 |
||
268 |
$(PLUG_EXPORT_DIR)/LICENSE: $(CLOSED_SHARE_SRC)/doc/openjdk/binary-plugs/LICENSE |
|
269 |
$(export-binary-plug-file) |
|
270 |
export-binary-plugs-license: $(PLUG_EXPORT_DIR)/LICENSE |
|
271 |
||
272 |
# Create jar file of plug classes (always created) |
|
273 |
||
274 |
$(PLUG_EXPORT_JARFILE): $(PLUG_TEMPDIR)/all.clist $(PLUG_TEMPDIR)/all.jargs |
|
275 |
@$(prep-target) |
|
276 |
@$(ECHO) "PLUG EXPORT: $(@F)" |
|
277 |
@$(CAT) $(PLUG_TEMPDIR)/all.clist | $(SED) -e 's/^/PLUG EXPORT: /' |
|
278 |
$(BOOT_JAR_CMD) cf $@ @$(PLUG_TEMPDIR)/all.jargs |
|
279 |
export-binary-plugs-jar: $(PLUG_EXPORT_JARFILE) |
|
280 |
||
281 |
# Export native libraries |
|
282 |
||
283 |
$(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY): \ |
|
284 |
$(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY) |
|
285 |
$(export-binary-plug-file) |
|
286 |
||
287 |
# Export binary plug start/complete messages |
|
288 |
||
289 |
export-binary-plugs-started: |
|
290 |
@$(ECHO) "BinaryPlugs export started: `date`" |
|
291 |
@$(ECHO) "PLUG_EXPORT_DIR=$(PLUG_EXPORT_DIR)" |
|
292 |
$(RM) -r $(PLUG_EXPORT_DIR) |
|
293 |
@$(MKDIR) -p $(PLUG_EXPORT_DIR) |
|
294 |
@$(MKDIR) -p $(PLUG_TEMPDIR) |
|
295 |
export-binary-plugs-completed: |
|
296 |
@$(RM) -r $(PLUG_TEMPDIR) |
|
297 |
@$(ECHO) "BinaryPlugs export completed: `date`" |
|
298 |
||
299 |
# Export lib files (only if they don't exist already) |
|
300 |
||
301 |
export-binary-plugs-libs: \ |
|
302 |
$(PLUG_LIBRARY_NAMES:%=$(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/%) |
|
303 |
||
304 |
# Export everything |
|
305 |
||
306 |
export-binary-plugs: \ |
|
307 |
export-binary-plugs-started \ |
|
308 |
export-binary-plugs-libs \ |
|
309 |
export-binary-plugs-license \ |
|
310 |
export-binary-plugs-jar \ |
|
311 |
export-binary-plugs-completed |
|
312 |
||
313 |
# All these targets are phony (no filenames) |
|
314 |
||
315 |
.PHONY: export-binary-plugs-started \ |
|
316 |
export-binary-plugs-license \ |
|
317 |
export-binary-plugs-jar \ |
|
318 |
export-binary-plugs-libs \ |
|
319 |
export-binary-plugs-completed \ |
|
320 |
export-binary-plugs |
|
321 |
||
322 |
# Rules that test the export and import of plugs (only when you can export) |
|
323 |
||
324 |
TEST_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-testing-plugs |
|
325 |
TEST_PLUG_COPY=$(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME)-testcopy |
|
326 |
||
327 |
# Run export-binary-plugs first, then use this rule to test an import |
|
328 |
||
329 |
test-binary-plugs: $(TEST_PLUG_COPY) |
|
330 |
$(RM) -r $(TEST_OUTPUTDIR)/$(PLUG_EXPORT_DIRNAME) |
|
331 |
$(MKDIR) -p $(TEST_OUTPUTDIR) |
|
332 |
@$(ECHO) "Testing import of plugs" |
|
333 |
($(CD) $(JDK_TOPDIR)/make && \ |
|
334 |
$(MAKE) OPENJDK=true \ |
|
335 |
ALT_OUTPUTDIR=$(TEST_OUTPUTDIR) \ |
|
336 |
ALT_JDK_IMPORT_PATH=$(JDK_IMPORT_PATH) \ |
|
337 |
ALT_BINARY_PLUGS_PATH=$(TEST_PLUG_COPY) \ |
|
338 |
import-binary-plugs ) |
|
339 |
$(RM) -r $(TEST_OUTPUTDIR) |
|
340 |
@$(ECHO) "Testing of plugs was successful" |
|
341 |
||
342 |
$(TEST_PLUG_COPY): |
|
343 |
@$(ECHO) "Creating test plug copy" |
|
344 |
$(RM) -r $@ |
|
345 |
$(MKDIR) -p $(@D) |
|
346 |
$(CP) -r -p $(PLUG_EXPORT_DIR) $@ |
|
347 |
||
348 |
.PHONY: test-binary-plugs |
|
349 |
||
350 |
endif # !OPENJDK |
|
351 |