author | mchung |
Wed, 10 Feb 2010 17:51:07 -0800 | |
changeset 4917 | c98da2209f8c |
parent 4665 | d14dc3d9e1fa |
child 5506 | 202f599c92aa |
permissions | -rw-r--r-- |
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 = ../.. |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4388
diff
changeset
|
29 |
MODULE = sound |
2 | 30 |
PACKAGE = javax.sound |
31 |
LIBRARY = jsound |
|
32 |
PRODUCT = sun |
|
33 |
include $(BUILDDIR)/common/Defs.gmk |
|
34 |
||
35 |
# include defines for sound |
|
36 |
include SoundDefs.gmk |
|
37 |
||
38 |
# support for different mixer provider files on different platforms |
|
39 |
#MXSP = javax.sound.sampled.spi.MixerProvider |
|
40 |
# Mixer Service Provider Additional path |
|
41 |
#MXSPP_ADD = |
|
42 |
||
43 |
# |
|
44 |
# Add use of mapfile |
|
45 |
# |
|
46 |
FILES_m = mapfile-vers |
|
47 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
48 |
||
49 |
# |
|
50 |
# Files |
|
51 |
# |
|
52 |
include FILES_c.gmk |
|
53 |
||
54 |
# add java files |
|
55 |
AUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound |
|
56 |
||
57 |
# |
|
58 |
# Files that just need cp. |
|
59 |
# |
|
60 |
SERVICEDIR = $(CLASSBINDIR)/META-INF/services |
|
61 |
||
62 |
FILES_copy = \ |
|
63 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \ |
|
64 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \ |
|
65 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \ |
|
66 |
$(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \ |
|
67 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \ |
|
68 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \ |
|
69 |
$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \ |
|
70 |
$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \ |
|
71 |
$(LIBDIR)/sound.properties |
|
72 |
||
73 |
FILES_mkdirs = \ |
|
74 |
$(CLASSBINDIR)/META-INF \ |
|
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
2
diff
changeset
|
75 |
$(CLASSBINDIR)/META-INF/services |
2 | 76 |
|
77 |
FILES_copydirs = \ |
|
78 |
$(CLASSBINDIR) \ |
|
79 |
$(LIBDIR) \ |
|
80 |
$(FILES_mkdirs) |
|
81 |
||
82 |
FILES_c += $(FILES_$(PLATFORM)) |
|
83 |
||
84 |
||
85 |
# |
|
86 |
# system dependent flags |
|
87 |
# |
|
88 |
ifeq ($(PLATFORM), windows) |
|
89 |
CPPFLAGS += -DUSE_PLATFORM_MIDI_OUT=TRUE \ |
|
90 |
-DUSE_PLATFORM_MIDI_IN=TRUE \ |
|
91 |
-DUSE_PORTS=TRUE |
|
92 |
LDLIBS += winmm.lib |
|
93 |
||
94 |
# Windows always provides MIDI and ports |
|
95 |
INCLUDE_MIDI = TRUE |
|
96 |
INCLUDE_PORTS = TRUE |
|
97 |
||
98 |
# DirectSound handles directaudio (both i586 and amd64) |
|
99 |
SUBDIRS += jsoundds |
|
100 |
EXTRA_SOUND_JNI_LIBS += jsoundds |
|
101 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/ |
|
102 |
endif # PLATFORM win32 |
|
103 |
||
104 |
ifeq ($(PLATFORM), linux) |
|
105 |
# ALSA handles directaudio, ports, and MIDI |
|
106 |
SUBDIRS += jsoundalsa |
|
107 |
EXTRA_SOUND_JNI_LIBS += jsoundalsa |
|
108 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/ |
|
109 |
endif # PLATFORM linux |
|
110 |
||
111 |
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
|
112 |
# 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
|
113 |
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
|
114 |
-DUSE_DAUDIO=TRUE |
2 | 115 |
|
4383
0ca32411c666
6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents:
1846
diff
changeset
|
116 |
INCLUDE_PORTS = TRUE |
0ca32411c666
6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents:
1846
diff
changeset
|
117 |
INCLUDE_DAUDIO = TRUE |
0ca32411c666
6744801: JCK api/javax_sound/interactive/RecordSoundTest.html#RecordSoundTest fails on Solaris10 x64 for -d64
amenkov
parents:
1846
diff
changeset
|
118 |
# 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
|
119 |
INCLUDE_MIDI = TRUE |
2 | 120 |
endif # PLATFORM solaris |
121 |
||
122 |
# for dynamic inclusion of extra sound libs: these |
|
123 |
# 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
|
124 |
CPPFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"' |
2 | 125 |
|
126 |
# integrate MIDI i/o in jsound lib |
|
127 |
ifeq ($(INCLUDE_MIDI),TRUE) |
|
128 |
FILES_c += $(MIDIFILES_c) |
|
129 |
FILES_export += $(MIDIFILES_export) |
|
130 |
endif |
|
131 |
||
132 |
# integrate port files in jsound lib |
|
133 |
ifeq ($(INCLUDE_PORTS),TRUE) |
|
134 |
FILES_c += $(PORTFILES_c) |
|
135 |
FILES_export += $(PORTFILES_export) |
|
136 |
endif |
|
137 |
||
138 |
# integrate port files in jsound lib |
|
139 |
ifeq ($(INCLUDE_DAUDIO),TRUE) |
|
140 |
FILES_c += $(DAUDIOFILES_c) |
|
141 |
FILES_export += $(DAUDIOFILES_export) |
|
142 |
endif |
|
143 |
||
144 |
# |
|
145 |
# Extra cc/linker flags. |
|
146 |
# |
|
147 |
CPPFLAGS += \ |
|
148 |
-I$(SHARE_SRC)/native/com/sun/media/sound |
|
149 |
||
150 |
# |
|
151 |
# Add to the ambient VPATH. |
|
152 |
# |
|
153 |
vpath %.c $(SHARE_SRC)/native/com/sun/media/sound |
|
154 |
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound |
|
155 |
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound |
|
156 |
||
157 |
||
158 |
# |
|
159 |
# Include rules |
|
160 |
# |
|
161 |
include $(BUILDDIR)/common/Library.gmk |
|
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4665
diff
changeset
|
162 |
include $(BUILDDIR)/common/Subdirs.gmk |
2 | 163 |
|
164 |
# |
|
165 |
# Rules that copy files. |
|
166 |
# |
|
167 |
||
168 |
build: copy-files |
|
169 |
$(SUBDIRS-loop) |
|
170 |
||
171 |
copy-files: $(FILES_copy) |
|
172 |
||
173 |
#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP) |
|
174 |
# $(install-file) |
|
175 |
||
176 |
$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/% |
|
177 |
$(install-file) |
|
178 |
||
179 |
$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/% |
|
180 |
$(install-file) |
|
181 |
||
182 |
$(LIBDIR)/%: $(SHARE_SRC)/lib/% |
|
183 |
$(install-file) |
|
184 |
||
185 |
# |
|
186 |
# Since we build more than the javax.sound (as stated in the |
|
187 |
# PACKAGE variable), we need to nuke the extra packages explicitly. |
|
188 |
# |
|
189 |
clean clobber:: |
|
190 |
$(SUBDIRS-loop) |
|
191 |
||
192 |
clean clobber:: |
|
193 |
$(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio |
|
194 |
$(RM) $(FILES_copy) |
|
195 |
||
196 |
# |
|
197 |
# Declare extra phony targets. |
|
198 |
# |
|
199 |
.PHONY: copy-files |