author | michaelm |
Wed, 29 Nov 2017 16:59:38 +0000 | |
branch | http-client-branch |
changeset 55912 | dfa9489d1cb1 |
parent 47217 | 72e3ae9a25eb |
child 49070 | d7859531621b |
child 56107 | 706dba352bda |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
29261
ea6e20f98dfa
8072665: SoundLibraries.gmk and SoundDefs.h: remove isSigned8() dead code
serb
parents:
27799
diff
changeset
|
2 |
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
20547 | 26 |
LIBJSOUND_SRC_DIRS := \ |
47217 | 27 |
$(TOPDIR)/src/java.desktop/share/native/libjsound \ |
28 |
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/libjsound \ |
|
25859 | 29 |
# |
30 |
LIBJSOUND_CFLAGS := \ |
|
27565 | 31 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop \ |
25859 | 32 |
$(LIBJAVA_HEADER_FLAGS) \ |
33 |
$(foreach dir, $(LIBJSOUND_SRC_DIRS), -I$(dir)) \ |
|
34 |
# |
|
20547 | 35 |
|
36 |
LIBJSOUND_SRC_FILES := Utilities.c Platform.c |
|
37 |
||
38 |
EXTRA_SOUND_JNI_LIBS := |
|
39 |
||
40 |
LIBJSOUND_MIDIFILES := \ |
|
41 |
MidiInDevice.c \ |
|
42 |
MidiInDeviceProvider.c \ |
|
43 |
MidiOutDevice.c \ |
|
44 |
MidiOutDeviceProvider.c \ |
|
45 |
PlatformMidi.c |
|
46 |
||
47 |
# files needed for ports |
|
48 |
LIBJSOUND_PORTFILES := \ |
|
49 |
PortMixerProvider.c \ |
|
50 |
PortMixer.c |
|
51 |
||
52 |
# files needed for direct audio |
|
53 |
LIBJSOUND_DAUDIOFILES := \ |
|
54 |
DirectAudioDeviceProvider.c \ |
|
55 |
DirectAudioDevice.c |
|
56 |
||
57 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
58 |
EXTRA_SOUND_JNI_LIBS += jsoundds |
|
59 |
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_WINDOWS \ |
|
60 |
-DUSE_PLATFORM_MIDI_OUT=TRUE \ |
|
61 |
-DUSE_PLATFORM_MIDI_IN=TRUE \ |
|
62 |
-DUSE_PORTS=TRUE |
|
63 |
LIBJSOUND_SRC_FILES += \ |
|
47191
8c95ea7056b7
8177951: Charset problem when the name of the sound device contains Chinese character
serb
parents:
35276
diff
changeset
|
64 |
PLATFORM_API_WinOS_Charset_Util.cpp \ |
20547 | 65 |
PLATFORM_API_WinOS_MidiIn.cpp \ |
66 |
PLATFORM_API_WinOS_MidiOut.c \ |
|
67 |
PLATFORM_API_WinOS_Util.c \ |
|
68 |
PLATFORM_API_WinOS_Ports.c |
|
69 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES) |
|
70 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES) |
|
71 |
endif # OPENJDK_TARGET_OS windows |
|
72 |
||
73 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
74 |
EXTRA_SOUND_JNI_LIBS += jsoundalsa |
|
75 |
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX |
|
76 |
endif # OPENJDK_TARGET_OS linux |
|
77 |
||
22593
938340719ac2
8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents:
22592
diff
changeset
|
78 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
79 |
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
80 |
endif # OPENJDK_TARGET_OS aix |
22593
938340719ac2
8024900: PPC64: Enable new build on AIX (jdk part)
simonis
parents:
22592
diff
changeset
|
81 |
|
20547 | 82 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
29931
64e274ed6567
8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents:
29374
diff
changeset
|
83 |
LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX |
20547 | 84 |
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \ |
85 |
-DUSE_PORTS=TRUE \ |
|
86 |
-DUSE_DAUDIO=TRUE \ |
|
87 |
-DUSE_PLATFORM_MIDI_OUT=TRUE \ |
|
88 |
-DUSE_PLATFORM_MIDI_IN=TRUE |
|
47217 | 89 |
LIBJSOUND_SRC_DIRS += $(TOPDIR)/src/java.desktop/macosx/native/libjsound |
20547 | 90 |
LIBJSOUND_SRC_FILES += \ |
91 |
PLATFORM_API_MacOSX_Utils.cpp \ |
|
92 |
PLATFORM_API_MacOSX_PCM.cpp \ |
|
93 |
PLATFORM_API_MacOSX_Ports.cpp \ |
|
94 |
PLATFORM_API_MacOSX_MidiIn.c \ |
|
95 |
PLATFORM_API_MacOSX_MidiOut.c \ |
|
96 |
PLATFORM_API_MacOSX_MidiUtils.c |
|
97 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES) |
|
98 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES) |
|
99 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES) |
|
100 |
endif # OPENJDK_TARGET_OS macosx |
|
101 |
||
102 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
103 |
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_SOLARIS \ |
|
104 |
-DUSE_PORTS=TRUE \ |
|
105 |
-DUSE_DAUDIO=TRUE |
|
106 |
LIBJSOUND_SRC_FILES += \ |
|
107 |
PLATFORM_API_SolarisOS_Utils.c \ |
|
108 |
PLATFORM_API_SolarisOS_Ports.c \ |
|
109 |
PLATFORM_API_SolarisOS_PCM.c |
|
110 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_MIDIFILES) |
|
111 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_PORTFILES) |
|
112 |
LIBJSOUND_SRC_FILES += $(LIBJSOUND_DAUDIOFILES) |
|
113 |
endif # OPENJDK_TARGET_OS solaris |
|
114 |
||
115 |
LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"' |
|
116 |
||
117 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \ |
|
118 |
LIBRARY := jsound, \ |
|
119 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
120 |
SRC := $(LIBJSOUND_SRC_DIRS), \ |
|
121 |
INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \ |
|
29931
64e274ed6567
8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents:
29374
diff
changeset
|
122 |
TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \ |
20547 | 123 |
OPTIMIZATION := LOW, \ |
124 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
125 |
$(LIBJSOUND_CFLAGS), \ |
|
126 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \ |
|
47217 | 127 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \ |
20547 | 128 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
129 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 130 |
LIBS_unix := -ljava -ljvm, \ |
131 |
LIBS_solaris := -lc, \ |
|
132 |
LIBS_macosx := -framework CoreAudio -framework CoreFoundation \ |
|
20547 | 133 |
-framework CoreServices -framework AudioUnit $(LIBCXX) \ |
134 |
-framework CoreMIDI -framework AudioToolbox, \ |
|
33406 | 135 |
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \ |
25859 | 136 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 137 |
RC_FLAGS := $(RC_FLAGS) \ |
138 |
-D "JDK_FNAME=jsound.dll" \ |
|
139 |
-D "JDK_INTERNAL_NAME=jsound" \ |
|
140 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 141 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsound, \ |
35276 | 142 |
)) |
20547 | 143 |
|
144 |
$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA) |
|
145 |
||
27565 | 146 |
TARGETS += $(BUILD_LIBJSOUND) |
20547 | 147 |
|
148 |
########################################################################################## |
|
149 |
||
150 |
ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), ) |
|
151 |
||
152 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDALSA, \ |
|
153 |
LIBRARY := jsoundalsa, \ |
|
154 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
155 |
SRC := $(LIBJSOUND_SRC_DIRS), \ |
|
156 |
INCLUDE_FILES := Utilities.c $(LIBJSOUND_MIDIFILES) $(LIBJSOUND_PORTFILES) \ |
|
157 |
$(LIBJSOUND_DAUDIOFILES) \ |
|
158 |
PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \ |
|
159 |
PLATFORM_API_LinuxOS_ALSA_PCM.c \ |
|
160 |
PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \ |
|
161 |
PLATFORM_API_LinuxOS_ALSA_MidiIn.c \ |
|
162 |
PLATFORM_API_LinuxOS_ALSA_MidiOut.c \ |
|
163 |
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \ |
|
164 |
PLATFORM_API_LinuxOS_ALSA_Ports.c, \ |
|
165 |
OPTIMIZATION := LOW, \ |
|
166 |
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \ |
|
167 |
$(LIBJSOUND_CFLAGS) \ |
|
168 |
-DUSE_DAUDIO=TRUE \ |
|
169 |
-DUSE_PORTS=TRUE \ |
|
170 |
-DUSE_PLATFORM_MIDI_OUT=TRUE \ |
|
171 |
-DUSE_PLATFORM_MIDI_IN=TRUE, \ |
|
47217 | 172 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjsoundalsa/mapfile-vers, \ |
20547 | 173 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
174 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 175 |
LIBS := $(ALSA_LIBS) -ljava -ljvm, \ |
27565 | 176 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundalsa, \ |
35276 | 177 |
)) |
20547 | 178 |
|
179 |
$(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA) |
|
180 |
||
27565 | 181 |
TARGETS += $(BUILD_LIBJSOUNDALSA) |
20547 | 182 |
|
183 |
endif |
|
184 |
||
185 |
########################################################################################## |
|
186 |
||
187 |
ifneq ($(filter jsoundds, $(EXTRA_SOUND_JNI_LIBS)), ) |
|
188 |
||
189 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJSOUNDDS, \ |
|
190 |
LIBRARY := jsoundds, \ |
|
191 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
192 |
SRC := $(LIBJSOUND_SRC_DIRS), \ |
|
193 |
INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \ |
|
47191
8c95ea7056b7
8177951: Charset problem when the name of the sound device contains Chinese character
serb
parents:
35276
diff
changeset
|
194 |
PLATFORM_API_WinOS_Charset_Util.cpp \ |
20547 | 195 |
PLATFORM_API_WinOS_DirectSound.cpp, \ |
196 |
OPTIMIZATION := LOW, \ |
|
197 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
198 |
$(LIBJSOUND_CFLAGS) \ |
|
199 |
-DUSE_DAUDIO=TRUE, \ |
|
200 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
|
201 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 202 |
LIBS := $(JDKLIB_LIBS) dsound.lib winmm.lib user32.lib ole32.lib, \ |
25859 | 203 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 204 |
RC_FLAGS := $(RC_FLAGS) \ |
205 |
-D "JDK_FNAME=jsoundds.dll" \ |
|
206 |
-D "JDK_INTERNAL_NAME=jsoundds" \ |
|
207 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 208 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjsoundds, \ |
35276 | 209 |
)) |
20547 | 210 |
|
211 |
$(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA) |
|
212 |
||
27565 | 213 |
TARGETS += $(BUILD_LIBJSOUNDDS) |
20547 | 214 |
|
215 |
endif |