2
|
1 |
#
|
|
2 |
# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
|
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
|
7 |
# published by the Free Software Foundation. Sun designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Sun in the LICENSE file that accompanied this code.
|
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
|
21 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or
|
|
23 |
# have any questions.
|
|
24 |
#
|
|
25 |
|
|
26 |
# WARNING: Make sure the OPENJDK plugs are up-to-date, see make/common/internal/BinaryPlugs.gmk
|
|
27 |
|
|
28 |
BUILDDIR = ../..
|
|
29 |
PACKAGE = javax.sound
|
|
30 |
LIBRARY = jsound
|
|
31 |
PRODUCT = sun
|
|
32 |
include $(BUILDDIR)/common/Defs.gmk
|
|
33 |
|
|
34 |
# include defines for sound
|
|
35 |
include SoundDefs.gmk
|
|
36 |
|
|
37 |
# support for different mixer provider files on different platforms
|
|
38 |
#MXSP = javax.sound.sampled.spi.MixerProvider
|
|
39 |
# Mixer Service Provider Additional path
|
|
40 |
#MXSPP_ADD =
|
|
41 |
|
|
42 |
#
|
|
43 |
# Add use of mapfile
|
|
44 |
#
|
|
45 |
FILES_m = mapfile-vers
|
|
46 |
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
|
47 |
|
|
48 |
#
|
|
49 |
# Files
|
|
50 |
#
|
|
51 |
include FILES_c.gmk
|
|
52 |
|
|
53 |
# add java files
|
|
54 |
AUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound
|
|
55 |
|
|
56 |
#
|
|
57 |
# Specific to OpenJDK building
|
|
58 |
#
|
|
59 |
ifdef OPENJDK
|
|
60 |
|
|
61 |
# copy closed .class files
|
|
62 |
build: import-binary-plug-sound-classes
|
|
63 |
|
|
64 |
include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
|
|
65 |
|
|
66 |
endif # OPENJDK
|
|
67 |
|
|
68 |
#
|
|
69 |
# Files that just need cp.
|
|
70 |
#
|
|
71 |
SERVICEDIR = $(CLASSBINDIR)/META-INF/services
|
|
72 |
|
|
73 |
FILES_copy = \
|
|
74 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \
|
|
75 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \
|
|
76 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \
|
|
77 |
$(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \
|
|
78 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \
|
|
79 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \
|
|
80 |
$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \
|
|
81 |
$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \
|
|
82 |
$(LIBDIR)/audio/soundbank.gm \
|
|
83 |
$(LIBDIR)/sound.properties
|
|
84 |
|
|
85 |
FILES_mkdirs = \
|
|
86 |
$(CLASSBINDIR)/META-INF \
|
|
87 |
$(CLASSBINDIR)/META-INF/services \
|
|
88 |
$(LIBDIR)/audio
|
|
89 |
|
|
90 |
FILES_copydirs = \
|
|
91 |
$(CLASSBINDIR) \
|
|
92 |
$(LIBDIR) \
|
|
93 |
$(FILES_mkdirs)
|
|
94 |
|
|
95 |
FILES_c += $(FILES_$(PLATFORM))
|
|
96 |
|
|
97 |
|
|
98 |
#
|
|
99 |
# add "closed" library
|
|
100 |
#
|
|
101 |
SUBDIRS += jsoundhs
|
|
102 |
|
|
103 |
#
|
|
104 |
# system dependent flags
|
|
105 |
#
|
|
106 |
ifeq ($(PLATFORM), windows)
|
|
107 |
CPPFLAGS += -DUSE_PLATFORM_MIDI_OUT=TRUE \
|
|
108 |
-DUSE_PLATFORM_MIDI_IN=TRUE \
|
|
109 |
-DUSE_PORTS=TRUE
|
|
110 |
LDLIBS += winmm.lib
|
|
111 |
|
|
112 |
# Windows always provides MIDI and ports
|
|
113 |
INCLUDE_MIDI = TRUE
|
|
114 |
INCLUDE_PORTS = TRUE
|
|
115 |
|
|
116 |
# DirectSound handles directaudio (both i586 and amd64)
|
|
117 |
SUBDIRS += jsoundds
|
|
118 |
EXTRA_SOUND_JNI_LIBS += jsoundds
|
|
119 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
|
|
120 |
endif # PLATFORM win32
|
|
121 |
|
|
122 |
ifeq ($(PLATFORM), linux)
|
|
123 |
# ALSA handles directaudio, ports, and MIDI
|
|
124 |
SUBDIRS += jsoundalsa
|
|
125 |
EXTRA_SOUND_JNI_LIBS += jsoundalsa
|
|
126 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
|
|
127 |
endif # PLATFORM linux
|
|
128 |
|
|
129 |
ifeq ($(PLATFORM), solaris)
|
|
130 |
ifneq ($(ARCH), amd64)
|
|
131 |
# build with ports and direct audio
|
|
132 |
CPPFLAGS += -DUSE_PORTS=TRUE \
|
|
133 |
-DUSE_DAUDIO=TRUE
|
|
134 |
|
|
135 |
INCLUDE_PORTS = TRUE
|
|
136 |
INCLUDE_DAUDIO = TRUE
|
|
137 |
INCLUDE_MIDI = TRUE
|
|
138 |
else
|
|
139 |
# build with empty MIDI i/o
|
|
140 |
INCLUDE_MIDI = TRUE
|
|
141 |
# build with empty ports
|
|
142 |
INCLUDE_PORTS = TRUE
|
|
143 |
# build with empty direct audio
|
|
144 |
INCLUDE_DAUDIO = TRUE
|
|
145 |
endif
|
|
146 |
endif # PLATFORM solaris
|
|
147 |
|
|
148 |
# for dynamic inclusion of extra sound libs: these
|
|
149 |
# JNI libs will be loaded from Platform.java
|
|
150 |
CPPFLAGS += -DEXTRA_SOUND_JNI_LIBS="\"$(EXTRA_SOUND_JNI_LIBS)\""
|
|
151 |
|
|
152 |
# integrate MIDI i/o in jsound lib
|
|
153 |
ifeq ($(INCLUDE_MIDI),TRUE)
|
|
154 |
FILES_c += $(MIDIFILES_c)
|
|
155 |
FILES_export += $(MIDIFILES_export)
|
|
156 |
endif
|
|
157 |
|
|
158 |
# integrate port files in jsound lib
|
|
159 |
ifeq ($(INCLUDE_PORTS),TRUE)
|
|
160 |
FILES_c += $(PORTFILES_c)
|
|
161 |
FILES_export += $(PORTFILES_export)
|
|
162 |
endif
|
|
163 |
|
|
164 |
# integrate port files in jsound lib
|
|
165 |
ifeq ($(INCLUDE_DAUDIO),TRUE)
|
|
166 |
FILES_c += $(DAUDIOFILES_c)
|
|
167 |
FILES_export += $(DAUDIOFILES_export)
|
|
168 |
endif
|
|
169 |
|
|
170 |
#
|
|
171 |
# Extra cc/linker flags.
|
|
172 |
#
|
|
173 |
CPPFLAGS += \
|
|
174 |
-I$(SHARE_SRC)/native/com/sun/media/sound
|
|
175 |
|
|
176 |
#
|
|
177 |
# Add to the ambient VPATH.
|
|
178 |
#
|
|
179 |
vpath %.c $(SHARE_SRC)/native/com/sun/media/sound
|
|
180 |
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound
|
|
181 |
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound
|
|
182 |
|
|
183 |
|
|
184 |
#
|
|
185 |
# Include rules
|
|
186 |
#
|
|
187 |
include $(BUILDDIR)/common/Library.gmk
|
|
188 |
|
|
189 |
#
|
|
190 |
# Rules that copy files.
|
|
191 |
#
|
|
192 |
|
|
193 |
build: copy-files
|
|
194 |
$(SUBDIRS-loop)
|
|
195 |
|
|
196 |
copy-files: $(FILES_copy)
|
|
197 |
|
|
198 |
#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP)
|
|
199 |
# $(install-file)
|
|
200 |
|
|
201 |
$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/%
|
|
202 |
$(install-file)
|
|
203 |
|
|
204 |
$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/%
|
|
205 |
$(install-file)
|
|
206 |
|
|
207 |
$(LIBDIR)/%: $(SHARE_SRC)/lib/%
|
|
208 |
$(install-file)
|
|
209 |
|
|
210 |
#
|
|
211 |
# Since we build more than the javax.sound (as stated in the
|
|
212 |
# PACKAGE variable), we need to nuke the extra packages explicitly.
|
|
213 |
#
|
|
214 |
clean clobber::
|
|
215 |
$(SUBDIRS-loop)
|
|
216 |
|
|
217 |
clean clobber::
|
|
218 |
$(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio
|
|
219 |
$(RM) $(FILES_copy)
|
|
220 |
|
|
221 |
#
|
|
222 |
# Declare extra phony targets.
|
|
223 |
#
|
|
224 |
.PHONY: copy-files
|