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