0N/A#
4768N/A# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
2362N/A# published by the Free Software Foundation. Oracle designates this
0N/A# particular file as subject to the "Classpath" exception as provided
2362N/A# by Oracle in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
0N/A#
0N/A
0N/ABUILDDIR = ../..
0N/APACKAGE = javax.sound
0N/ALIBRARY = jsound
0N/APRODUCT = sun
4632N/A
4632N/Aifeq ($(PLATFORM),macosx)
4632N/ACPLUSPLUSLIBRARY = true
4632N/Aendif
4632N/A
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/A
0N/A# include defines for sound
0N/Ainclude SoundDefs.gmk
0N/A
0N/A# support for different mixer provider files on different platforms
0N/A#MXSP = javax.sound.sampled.spi.MixerProvider
0N/A# Mixer Service Provider Additional path
0N/A#MXSPP_ADD =
0N/A
0N/A#
0N/A# Add use of mapfile
0N/A#
0N/AFILES_m = mapfile-vers
0N/Ainclude $(BUILDDIR)/common/Mapfile-vers.gmk
0N/A
0N/A#
0N/A# Files
0N/A#
0N/Ainclude FILES_c.gmk
0N/A
0N/A# add java files
0N/AAUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound
0N/A
0N/A#
0N/A# Files that just need cp.
0N/A#
0N/ASERVICEDIR = $(CLASSBINDIR)/META-INF/services
0N/A
0N/AFILES_copy = \
0N/A $(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \
0N/A $(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \
0N/A $(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \
0N/A $(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \
0N/A $(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \
0N/A $(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \
0N/A $(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \
0N/A $(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \
0N/A $(LIBDIR)/sound.properties
0N/A
0N/AFILES_mkdirs = \
0N/A $(CLASSBINDIR)/META-INF \
829N/A $(CLASSBINDIR)/META-INF/services
0N/A
0N/AFILES_copydirs = \
0N/A $(CLASSBINDIR) \
0N/A $(LIBDIR) \
0N/A $(FILES_mkdirs)
0N/A
0N/AFILES_c += $(FILES_$(PLATFORM))
4632N/AFILES_cpp += $(FILES_cpp_$(PLATFORM))
0N/A
0N/A
0N/A#
0N/A# system dependent flags
0N/A#
0N/Aifeq ($(PLATFORM), windows)
0N/A CPPFLAGS += -DUSE_PLATFORM_MIDI_OUT=TRUE \
0N/A -DUSE_PLATFORM_MIDI_IN=TRUE \
0N/A -DUSE_PORTS=TRUE
0N/A LDLIBS += winmm.lib
0N/A
0N/A # Windows always provides MIDI and ports
0N/A INCLUDE_MIDI = TRUE
0N/A INCLUDE_PORTS = TRUE
0N/A
0N/A # DirectSound handles directaudio (both i586 and amd64)
0N/A SUBDIRS += jsoundds
0N/A EXTRA_SOUND_JNI_LIBS += jsoundds
0N/A #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
0N/Aendif # PLATFORM win32
0N/A
0N/Aifeq ($(PLATFORM), linux)
0N/A # ALSA handles directaudio, ports, and MIDI
0N/A SUBDIRS += jsoundalsa
0N/A EXTRA_SOUND_JNI_LIBS += jsoundalsa
0N/A #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
0N/Aendif # PLATFORM linux
0N/A
4632N/Aifeq ($(PLATFORM), macosx)
4632N/A CPPFLAGS += -DUSE_PORTS=TRUE \
4632N/A -DUSE_DAUDIO=TRUE \
4632N/A -DUSE_PLATFORM_MIDI_OUT=TRUE \
4632N/A -DUSE_PLATFORM_MIDI_IN=TRUE
4632N/A
4632N/A INCLUDE_PORTS = TRUE
4632N/A INCLUDE_DAUDIO = TRUE
4632N/A INCLUDE_MIDI = TRUE
4632N/A
4632N/A LDFLAGS += -framework CoreAudio -framework CoreFoundation \
4632N/A -framework CoreServices -framework AudioUnit -lstdc++ \
4768N/A -framework CoreMIDI -framework AudioToolbox
4632N/A CXXFLAGS += -I`xcode-select -print-path`/Extras/CoreAudio/PublicUtility
4632N/Aendif
4632N/A
0N/Aifeq ($(PLATFORM), solaris)
1988N/A # build with ports and direct audio
1988N/A CPPFLAGS += -DUSE_PORTS=TRUE \
1988N/A -DUSE_DAUDIO=TRUE
0N/A
1988N/A INCLUDE_PORTS = TRUE
1988N/A INCLUDE_DAUDIO = TRUE
1988N/A # build with empty MIDI i/o
1988N/A INCLUDE_MIDI = TRUE
0N/Aendif # PLATFORM solaris
0N/A
0N/A# for dynamic inclusion of extra sound libs: these
0N/A# JNI libs will be loaded from Platform.java
1777N/ACPPFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
0N/A
0N/A# integrate MIDI i/o in jsound lib
0N/Aifeq ($(INCLUDE_MIDI),TRUE)
0N/A FILES_c += $(MIDIFILES_c)
0N/A FILES_export += $(MIDIFILES_export)
0N/Aendif
0N/A
0N/A# integrate port files in jsound lib
0N/Aifeq ($(INCLUDE_PORTS),TRUE)
0N/A FILES_c += $(PORTFILES_c)
0N/A FILES_export += $(PORTFILES_export)
0N/Aendif
0N/A
0N/A# integrate port files in jsound lib
0N/Aifeq ($(INCLUDE_DAUDIO),TRUE)
0N/A FILES_c += $(DAUDIOFILES_c)
0N/A FILES_export += $(DAUDIOFILES_export)
0N/Aendif
0N/A
0N/A#
0N/A# Extra cc/linker flags.
0N/A#
0N/ACPPFLAGS += \
0N/A -I$(SHARE_SRC)/native/com/sun/media/sound
0N/A
4632N/Aifeq ($(PLATFORM), macosx)
4632N/Avpath %.c $(call NativeSrcDirList,,native/com/sun/media/sound)
4632N/Avpath %.cpp $(call NativeSrcDirList,,native/com/sun/media/sound)
4632N/A
4632N/Aelse
0N/A#
0N/A# Add to the ambient VPATH.
0N/A#
0N/Avpath %.c $(SHARE_SRC)/native/com/sun/media/sound
0N/Avpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
0N/Avpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
0N/A
4632N/Aendif
0N/A
0N/A#
0N/A# Include rules
0N/A#
0N/Ainclude $(BUILDDIR)/common/Library.gmk
2157N/Ainclude $(BUILDDIR)/common/Subdirs.gmk
0N/A
0N/A#
0N/A# Rules that copy files.
0N/A#
0N/A
0N/Abuild: copy-files
0N/A $(SUBDIRS-loop)
0N/A
0N/Acopy-files: $(FILES_copy)
0N/A
0N/A#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP)
0N/A# $(install-file)
0N/A
0N/A$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/%
0N/A $(install-file)
0N/A
0N/A$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/%
0N/A $(install-file)
0N/A
0N/A$(LIBDIR)/%: $(SHARE_SRC)/lib/%
0N/A $(install-file)
0N/A
0N/A#
0N/A# Since we build more than the javax.sound (as stated in the
0N/A# PACKAGE variable), we need to nuke the extra packages explicitly.
0N/A#
0N/Aclean clobber::
0N/A $(SUBDIRS-loop)
0N/A
0N/Aclean clobber::
0N/A $(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio
0N/A $(RM) $(FILES_copy)
0N/A
0N/A#
0N/A# Declare extra phony targets.
0N/A#
0N/A.PHONY: copy-files