author | jjg |
Thu, 27 Aug 2009 18:25:21 -0700 | |
changeset 3770 | 12d0e59df0fb |
parent 1846 | 4a53d636e2f4 |
child 4116 | 54b55d640d9a |
child 4383 | 0ca32411c666 |
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 = ../.. |
|
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 |
# Files that just need cp. |
|
58 |
# |
|
59 |
SERVICEDIR = $(CLASSBINDIR)/META-INF/services |
|
60 |
||
61 |
FILES_copy = \ |
|
62 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiDeviceProvider \ |
|
63 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileWriter \ |
|
64 |
$(SERVICEDIR)/javax.sound.midi.spi.MidiFileReader \ |
|
65 |
$(SERVICEDIR)/javax.sound.midi.spi.SoundbankReader \ |
|
66 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileWriter \ |
|
67 |
$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \ |
|
68 |
$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \ |
|
69 |
$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \ |
|
70 |
$(LIBDIR)/sound.properties |
|
71 |
||
72 |
FILES_mkdirs = \ |
|
73 |
$(CLASSBINDIR)/META-INF \ |
|
1846
4a53d636e2f4
6702956: OpenJDK: replace encumbered code (software synthesizer)
amenkov
parents:
2
diff
changeset
|
74 |
$(CLASSBINDIR)/META-INF/services |
2 | 75 |
|
76 |
FILES_copydirs = \ |
|
77 |
$(CLASSBINDIR) \ |
|
78 |
$(LIBDIR) \ |
|
79 |
$(FILES_mkdirs) |
|
80 |
||
81 |
FILES_c += $(FILES_$(PLATFORM)) |
|
82 |
||
83 |
||
84 |
# |
|
85 |
# system dependent flags |
|
86 |
# |
|
87 |
ifeq ($(PLATFORM), windows) |
|
88 |
CPPFLAGS += -DUSE_PLATFORM_MIDI_OUT=TRUE \ |
|
89 |
-DUSE_PLATFORM_MIDI_IN=TRUE \ |
|
90 |
-DUSE_PORTS=TRUE |
|
91 |
LDLIBS += winmm.lib |
|
92 |
||
93 |
# Windows always provides MIDI and ports |
|
94 |
INCLUDE_MIDI = TRUE |
|
95 |
INCLUDE_PORTS = TRUE |
|
96 |
||
97 |
# DirectSound handles directaudio (both i586 and amd64) |
|
98 |
SUBDIRS += jsoundds |
|
99 |
EXTRA_SOUND_JNI_LIBS += jsoundds |
|
100 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/ |
|
101 |
endif # PLATFORM win32 |
|
102 |
||
103 |
ifeq ($(PLATFORM), linux) |
|
104 |
# ALSA handles directaudio, ports, and MIDI |
|
105 |
SUBDIRS += jsoundalsa |
|
106 |
EXTRA_SOUND_JNI_LIBS += jsoundalsa |
|
107 |
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/ |
|
108 |
endif # PLATFORM linux |
|
109 |
||
110 |
ifeq ($(PLATFORM), solaris) |
|
111 |
ifneq ($(ARCH), amd64) |
|
112 |
# build with ports and direct audio |
|
113 |
CPPFLAGS += -DUSE_PORTS=TRUE \ |
|
114 |
-DUSE_DAUDIO=TRUE |
|
115 |
||
116 |
INCLUDE_PORTS = TRUE |
|
117 |
INCLUDE_DAUDIO = TRUE |
|
118 |
INCLUDE_MIDI = TRUE |
|
119 |
else |
|
120 |
# build with empty MIDI i/o |
|
121 |
INCLUDE_MIDI = TRUE |
|
122 |
# build with empty ports |
|
123 |
INCLUDE_PORTS = TRUE |
|
124 |
# build with empty direct audio |
|
125 |
INCLUDE_DAUDIO = TRUE |
|
126 |
endif |
|
127 |
endif # PLATFORM solaris |
|
128 |
||
129 |
# for dynamic inclusion of extra sound libs: these |
|
130 |
# JNI libs will be loaded from Platform.java |
|
131 |
CPPFLAGS += -DEXTRA_SOUND_JNI_LIBS="\"$(EXTRA_SOUND_JNI_LIBS)\"" |
|
132 |
||
133 |
# integrate MIDI i/o in jsound lib |
|
134 |
ifeq ($(INCLUDE_MIDI),TRUE) |
|
135 |
FILES_c += $(MIDIFILES_c) |
|
136 |
FILES_export += $(MIDIFILES_export) |
|
137 |
endif |
|
138 |
||
139 |
# integrate port files in jsound lib |
|
140 |
ifeq ($(INCLUDE_PORTS),TRUE) |
|
141 |
FILES_c += $(PORTFILES_c) |
|
142 |
FILES_export += $(PORTFILES_export) |
|
143 |
endif |
|
144 |
||
145 |
# integrate port files in jsound lib |
|
146 |
ifeq ($(INCLUDE_DAUDIO),TRUE) |
|
147 |
FILES_c += $(DAUDIOFILES_c) |
|
148 |
FILES_export += $(DAUDIOFILES_export) |
|
149 |
endif |
|
150 |
||
151 |
# |
|
152 |
# Extra cc/linker flags. |
|
153 |
# |
|
154 |
CPPFLAGS += \ |
|
155 |
-I$(SHARE_SRC)/native/com/sun/media/sound |
|
156 |
||
157 |
# |
|
158 |
# Add to the ambient VPATH. |
|
159 |
# |
|
160 |
vpath %.c $(SHARE_SRC)/native/com/sun/media/sound |
|
161 |
vpath %.c $(PLATFORM_SRC)/native/com/sun/media/sound |
|
162 |
vpath %.cpp $(PLATFORM_SRC)/native/com/sun/media/sound |
|
163 |
||
164 |
||
165 |
# |
|
166 |
# Include rules |
|
167 |
# |
|
168 |
include $(BUILDDIR)/common/Library.gmk |
|
169 |
||
170 |
# |
|
171 |
# Rules that copy files. |
|
172 |
# |
|
173 |
||
174 |
build: copy-files |
|
175 |
$(SUBDIRS-loop) |
|
176 |
||
177 |
copy-files: $(FILES_copy) |
|
178 |
||
179 |
#$(SERVICEDIR)/$(MXSP): $(SHARE_SRC)/classes/com/sun/media/sound/services/$(MXSPP_ADD)$(MXSP) |
|
180 |
# $(install-file) |
|
181 |
||
182 |
$(SERVICEDIR)/%: $(SHARE_SRC)/classes/com/sun/media/sound/services/% |
|
183 |
$(install-file) |
|
184 |
||
185 |
$(LIBDIR)/audio/%: $(SHARE_SRC)/lib/audio/% |
|
186 |
$(install-file) |
|
187 |
||
188 |
$(LIBDIR)/%: $(SHARE_SRC)/lib/% |
|
189 |
$(install-file) |
|
190 |
||
191 |
# |
|
192 |
# Since we build more than the javax.sound (as stated in the |
|
193 |
# PACKAGE variable), we need to nuke the extra packages explicitly. |
|
194 |
# |
|
195 |
clean clobber:: |
|
196 |
$(SUBDIRS-loop) |
|
197 |
||
198 |
clean clobber:: |
|
199 |
$(RM) -r $(CLASSBINDIR)/com/sun/media/sound $(LIBDIR)/audio |
|
200 |
$(RM) $(FILES_copy) |
|
201 |
||
202 |
# |
|
203 |
# Declare extra phony targets. |
|
204 |
# |
|
205 |
.PHONY: copy-files |