jdk/make/javax/sound/Makefile
author ohair
Thu, 23 Dec 2010 18:50:21 -0800
changeset 7666 7b994e3dd41d
parent 5506 202f599c92aa
child 7668 d4a77089c587
permissions -rw-r--r--
7008723: Remove binary plugs creation and use from openjdk Reviewed-by: mchung, andrew, aph, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
     2
# Copyright (c) 1999, 2007, Oracle and/or its affiliates. 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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
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
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
BUILDDIR = ../..
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4388
diff changeset
    27
MODULE  = sound
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
PACKAGE = javax.sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
LIBRARY = jsound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# include defines for sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
include SoundDefs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# support for different mixer provider files on different platforms
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#MXSP = javax.sound.sampled.spi.MixerProvider
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
# Mixer Service Provider Additional path
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#MXSPP_ADD =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# Add use of mapfile
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
FILES_m = mapfile-vers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# Files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
include FILES_c.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# add java files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
AUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
# Files that just need cp.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
SERVICEDIR = $(CLASSBINDIR)/META-INF/services
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
FILES_copy = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
	$(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
	$(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
	$(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
	$(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
	$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
	$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
	$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
	$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
	$(LIBDIR)/sound.properties
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
FILES_mkdirs = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
	$(CLASSBINDIR)/META-INF \
1846
4a53d636e2f4 6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents: 2
diff changeset
    73
	$(CLASSBINDIR)/META-INF/services
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
FILES_copydirs = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
	$(CLASSBINDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
	$(LIBDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
	$(FILES_mkdirs)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
FILES_c += $(FILES_$(PLATFORM))
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
# system dependent flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
  CPPFLAGS += 	-DUSE_PLATFORM_MIDI_OUT=TRUE \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
		-DUSE_PLATFORM_MIDI_IN=TRUE \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
		-DUSE_PORTS=TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
  LDLIBS += winmm.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
  # Windows always provides MIDI and ports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
  INCLUDE_MIDI  = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  INCLUDE_PORTS = TRUE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
  # DirectSound handles directaudio (both i586 and amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
  SUBDIRS += jsoundds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
  EXTRA_SOUND_JNI_LIBS += jsoundds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
endif # PLATFORM win32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
  # ALSA handles directaudio, ports, and MIDI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  SUBDIRS += jsoundalsa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  EXTRA_SOUND_JNI_LIBS += jsoundalsa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
  #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
endif # PLATFORM linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
ifeq ($(PLATFORM), solaris)
4383
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   110
  # build with ports and direct audio
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   111
  CPPFLAGS += -DUSE_PORTS=TRUE 	\
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   112
              -DUSE_DAUDIO=TRUE
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
4383
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   114
  INCLUDE_PORTS = TRUE
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   115
  INCLUDE_DAUDIO = TRUE
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   116
  # build with empty MIDI i/o
0ca32411c666 6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents: 1846
diff changeset
   117
  INCLUDE_MIDI = TRUE
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
endif # PLATFORM solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
# for dynamic inclusion of extra sound libs: these
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
# JNI libs will be loaded from Platform.java
4116
54b55d640d9a 6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents: 1846
diff changeset
   122
CPPFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
# integrate MIDI i/o in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
ifeq ($(INCLUDE_MIDI),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  FILES_c += $(MIDIFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
  FILES_export += $(MIDIFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
# integrate port files in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
ifeq ($(INCLUDE_PORTS),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
  FILES_c += $(PORTFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
  FILES_export += $(PORTFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
# integrate port files in jsound lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
ifeq ($(INCLUDE_DAUDIO),TRUE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  FILES_c += $(DAUDIOFILES_c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  FILES_export += $(DAUDIOFILES_export)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
# Extra cc/linker flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
CPPFLAGS += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
	-I$(SHARE_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
# Add to the ambient VPATH.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
vpath %.c $(SHARE_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
# Include rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
include $(BUILDDIR)/common/Library.gmk
4917
c98da2209f8c 6915413: Module build: building of specified jdk components instead of all
mchung
parents: 4665
diff changeset
   160
include $(BUILDDIR)/common/Subdirs.gmk
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
# Rules that copy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
build: copy-files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
	$(SUBDIRS-loop)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
copy-files: $(FILES_copy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
#	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
$(LIBDIR)/%: $(SHARE_SRC)/lib/%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
# Since we build more than the javax.sound (as stated in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
# PACKAGE variable), we need to nuke the extra packages explicitly.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
	$(SUBDIRS-loop)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
clean clobber::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
	$(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	$(RM) $(FILES_copy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
# Declare extra phony targets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
.PHONY: copy-files