Makefile revision 1988
0N/A#
1988N/A# Copyright 1999-2007 Sun Microsystems, Inc. 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
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun 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,
1472N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1472N/A#
1472N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit www.sun.com if you need additional information or
0N/A# have any questions.
0N/A#
1879N/A
1879N/A# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
1879N/A
1879N/ABUILDDIR = ../..
1879N/APACKAGE = javax.sound
1879N/ALIBRARY = jsound
1879N/APRODUCT = sun
1879N/Ainclude $(BUILDDIR)/common/Defs.gmk
1879N/A
1879N/A# include defines for sound
1879N/Ainclude SoundDefs.gmk
1879N/A
1879N/A# support for different mixer provider files on different platforms
1879N/A#MXSP = javax.sound.sampled.spi.MixerProvider
1879N/A# Mixer Service Provider Additional path
1879N/A#MXSPP_ADD =
1879N/A
1879N/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 \
0N/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))
0N/A
0N/A
0N/A#
304N/A# system dependent flags
304N/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
304N/A LDLIBS += winmm.lib
304N/A
304N/A # Windows always provides MIDI and ports
304N/A INCLUDE_MIDI = TRUE
304N/A INCLUDE_PORTS = TRUE
304N/A
304N/A # DirectSound handles directaudio (both i586 and amd64)
304N/A SUBDIRS += jsoundds
304N/A EXTRA_SOUND_JNI_LIBS += jsoundds
304N/A #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
304N/Aendif # PLATFORM win32
304N/A
304N/Aifeq ($(PLATFORM), linux)
304N/A # ALSA handles directaudio, ports, and MIDI
304N/A SUBDIRS += jsoundalsa
304N/A EXTRA_SOUND_JNI_LIBS += jsoundalsa
304N/A #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
304N/Aendif # PLATFORM linux
304N/A
304N/Aifeq ($(PLATFORM), solaris)
304N/A # build with ports and direct audio
304N/A CPPFLAGS += -DUSE_PORTS=TRUE \
304N/A -DUSE_DAUDIO=TRUE
304N/A
304N/A INCLUDE_PORTS = TRUE
304N/A INCLUDE_DAUDIO = TRUE
304N/A # build with empty MIDI i/o
304N/A INCLUDE_MIDI = TRUE
304N/Aendif # PLATFORM solaris
304N/A
304N/A# for dynamic inclusion of extra sound libs: these
304N/A# JNI libs will be loaded from Platform.java
304N/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
304N/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)
304N/A FILES_export += $(DAUDIOFILES_export)
0N/Aendif
0N/A
304N/A#
304N/A# Extra cc/linker flags.
0N/A#
0N/ACPPFLAGS += \
0N/A -I$(SHARE_SRC)/native/com/sun/media/sound
624N/A
624N/A#
624N/A# Add to the ambient VPATH.
624N/A#
624N/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
624N/A
0N/A#
0N/A# Include rules
0N/A#
624N/Ainclude $(BUILDDIR)/common/Library.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)
304N/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#
304N/A.PHONY: copy-files
304N/A