jdk/make/javax/sound/Makefile
author kvn
Mon, 25 Feb 2008 15:05:44 -0800
changeset 202 dc13bf0e5d5d
parent 2 90ce3da70b43
child 1846 4a53d636e2f4
permissions -rw-r--r--
6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM Summary: T_ADDRESS size is defined as 'int' size (4 bytes) but C2 use it for raw pointers and as memory type for StoreP and LoadP nodes. Reviewed-by: jrose
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
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
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
PACKAGE = javax.sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
LIBRARY = jsound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# include defines for sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
include SoundDefs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# support for different mixer provider files on different platforms
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#MXSP = javax.sound.sampled.spi.MixerProvider
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
# Mixer Service Provider Additional path
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#MXSPP_ADD =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# Add use of mapfile
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
FILES_m = mapfile-vers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
include FILES_c.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# add java files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
AUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
# Specific to OpenJDK building
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# copy closed .class files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
build: import-binary-plug-sound-classes 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# Files that just need cp.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
SERVICEDIR = $(CLASSBINDIR)/META-INF/services
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
FILES_copy = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
	$(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	$(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
	$(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
	$(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
	$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
	$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
	$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
	$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	$(LIBDIR)/audio/soundbank.gm \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
	$(LIBDIR)/sound.properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
FILES_mkdirs = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
	$(CLASSBINDIR)/META-INF \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
	$(CLASSBINDIR)/META-INF/services \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
	$(LIBDIR)/audio
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
FILES_copydirs = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
	$(CLASSBINDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
	$(LIBDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
	$(FILES_mkdirs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
FILES_c += $(FILES_$(PLATFORM))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
# add "closed" library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
SUBDIRS += jsoundhs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
# system dependent flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  CPPFLAGS += 	-DUSE_PLATFORM_MIDI_OUT=TRUE \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
		-DUSE_PLATFORM_MIDI_IN=TRUE \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
		-DUSE_PORTS=TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  LDLIBS += winmm.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
  # Windows always provides MIDI and ports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  INCLUDE_MIDI  = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
  INCLUDE_PORTS = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  # DirectSound handles directaudio (both i586 and amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
  SUBDIRS += jsoundds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
  EXTRA_SOUND_JNI_LIBS += jsoundds
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
  #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
endif # PLATFORM win32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
  # ALSA handles directaudio, ports, and MIDI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
  SUBDIRS += jsoundalsa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
  EXTRA_SOUND_JNI_LIBS += jsoundalsa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
endif # PLATFORM linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
  ifneq ($(ARCH), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    # build with ports and direct audio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    CPPFLAGS += -DUSE_PORTS=TRUE 	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                -DUSE_DAUDIO=TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    INCLUDE_PORTS = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    INCLUDE_DAUDIO = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    INCLUDE_MIDI = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    # build with empty MIDI i/o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    INCLUDE_MIDI = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    # build with empty ports
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    INCLUDE_PORTS = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    # build with empty direct audio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    INCLUDE_DAUDIO = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
endif # PLATFORM solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
# for dynamic inclusion of extra sound libs: these
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
# JNI libs will be loaded from Platform.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
CPPFLAGS += -DEXTRA_SOUND_JNI_LIBS="\"$(EXTRA_SOUND_JNI_LIBS)\""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
# integrate MIDI i/o in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
ifeq ($(INCLUDE_MIDI),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
  FILES_c += $(MIDIFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
  FILES_export += $(MIDIFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
# integrate port files in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
ifeq ($(INCLUDE_PORTS),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
  FILES_c += $(PORTFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  FILES_export += $(PORTFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# integrate port files in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
ifeq ($(INCLUDE_DAUDIO),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  FILES_c += $(DAUDIOFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
  FILES_export += $(DAUDIOFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
# Extra cc/linker flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
CPPFLAGS += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
	-I$(SHARE_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
# Add to the ambient VPATH.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
vpath %.c $(SHARE_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
# Include rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# Rules that copy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
build: copy-files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
	$(SUBDIRS-loop)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
copy-files: $(FILES_copy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
$(LIBDIR)/%: $(SHARE_SRC)/lib/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
# Since we build more than the javax.sound (as stated in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
# PACKAGE variable), we need to nuke the extra packages explicitly.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
	$(SUBDIRS-loop)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
	$(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
	$(RM) $(FILES_copy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
# Declare extra phony targets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
.PHONY: copy-files