VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/utils/audio/Makefile.kmk@ 98119

Last change on this file since 98119 was 98119, checked in by vboxsync, 2 years ago

ValKit/Audio: Attempt at a more proper build fix for the vkathost.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1# $Id: Makefile.kmk 98119 2023-01-18 12:40:22Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Audio Utilities.
4#
5
6#
7# Copyright (C) 2010-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# The contents of this file may alternatively be used under the terms
26# of the Common Development and Distribution License Version 1.0
27# (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28# in the VirtualBox distribution, in which case the provisions of the
29# CDDL are applicable instead of those of the GPL.
30#
31# You may elect to license modified versions of this file under the
32# terms and conditions of either the GPL or the CDDL or both.
33#
34# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35#
36
37SUB_DEPTH = ../../../../..
38include $(KBUILD_PATH)/subheader.kmk
39
40#
41# Make sure the ValKit config file is included when the additions build
42# is including just this makefile.
43#
44ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
45 include $(PATH_ROOT)/src/VBox/ValidationKit/Config.kmk
46endif
47
48
49#
50# Globals.
51#
52VBOX_PATH_SRC_DEVICES = $(PATH_ROOT)/src/VBox/Devices
53VKAT_PATH_AUDIO = $(VBOX_PATH_SRC_DEVICES)/Audio
54
55
56#
57# Append what we build here to PROGRAMS (at the top because it's a bit messy).
58#
59ifn1of ($(KBUILD_TARGET), os2 freebsd netbsd openbsd)
60 if defined(VBOX_ONLY_VALIDATIONKIT) || !defined(VBOX_ONLY_BUILD)
61 PROGRAMS += vkat
62 ifdef VBOX_WITH_HOST_SHIPPING_AUDIO_TEST
63 if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
64 PROGRAMS += vkathost
65 endif
66 endif
67 endif
68 ifdef VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST
69 if defined(VBOX_ONLY_ADDITIONS) || !defined(VBOX_ONLY_BUILD)
70 ifndef VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER
71 ifdef VBOX_WITH_ADDITIONS
72 PROGRAMS += vkatadd
73 endif
74 endif
75 endif
76 endif
77endif
78
79
80#
81# Utility to play sine wave to Default Audio Device.
82#
83if 0 # Disabled for now; does not work without WinMM.dll import validator files.
84 PROGRAMS.win += ntPlayToneWaveX
85 ntPlayToneWaveX_TEMPLATE = VBoxValidationKitR3
86 ntPlayToneWaveX_SOURCES = ntPlayToneWaveX.cpp
87 ntPlayToneWaveX_LIBS += \
88 WinMM.Lib
89endif
90
91
92#
93# The Validation Kit Audio Test (VKAT) utility.
94#
95vkat_TEMPLATE = VBoxValidationKitR3
96vkat_VBOX_IMPORT_CHECKER.win.x86 = nt4
97vkat_DEFS = VBOX_AUDIO_VKAT IN_VMM_R3 IN_VMM_STATIC
98vkat_INCS = \
99 $(PATH_ROOT)/src/VBox/Devices/build \
100 $(PATH_ROOT)/src/VBox/Devices \
101 $(PATH_ROOT)/src/VBox/Devices/Audio
102vkat_SOURCES = \
103 vkat.cpp \
104 vkatCommon.cpp \
105 vkatCmdGeneric.cpp \
106 vkatDriverStack.cpp \
107 $(VKAT_PATH_AUDIO)/AudioTest.cpp \
108 $(VKAT_PATH_AUDIO)/DrvAudio.cpp \
109 $(VKAT_PATH_AUDIO)/DrvHostAudioNull.cpp \
110 $(VKAT_PATH_AUDIO)/AudioMixer.cpp \
111 $(VKAT_PATH_AUDIO)/AudioMixBuffer.cpp \
112 $(VKAT_PATH_AUDIO)/AudioHlp.cpp
113
114# Debug stuff.
115ifdef VBOX_WITH_AUDIO_DEBUG
116 vkat_DEFS += VBOX_WITH_AUDIO_DEBUG
117 vkat_SOURCES += \
118 $(VKAT_PATH_AUDIO)/DrvHostAudioDebug.cpp
119endif
120
121# Self-test stuff.
122vkat_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
123vkat_SOURCES += \
124 vkatCmdSelfTest.cpp \
125 $(VKAT_PATH_AUDIO)/DrvHostAudioValidationKit.cpp \
126 $(VKAT_PATH_AUDIO)/AudioTestService.cpp \
127 $(VKAT_PATH_AUDIO)/AudioTestServiceClient.cpp \
128 $(VKAT_PATH_AUDIO)/AudioTestServiceProtocol.cpp \
129 $(VKAT_PATH_AUDIO)/AudioTestServiceTcp.cpp
130
131ifdef VBOX_WITH_AUDIO_PULSE
132 vkat_DEFS += VBOX_WITH_AUDIO_PULSE
133 vkat_SOURCES += \
134 $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudioStubs.cpp \
135 $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudio.cpp
136endif
137
138ifdef VBOX_WITH_AUDIO_ALSA
139 vkat_DEFS += VBOX_WITH_AUDIO_ALSA
140 vkat_SOURCES += \
141 $(VKAT_PATH_AUDIO)/DrvHostAudioAlsa.cpp \
142 $(VKAT_PATH_AUDIO)/DrvHostAudioAlsaStubs.cpp
143endif
144
145ifdef VBOX_WITH_AUDIO_OSS
146 vkat_DEFS += VBOX_WITH_AUDIO_OSS
147 vkat_SOURCES += \
148 $(VKAT_PATH_AUDIO)/DrvHostAudioOss.cpp
149endif
150
151vkat_SOURCES.win += \
152 $(VKAT_PATH_AUDIO)/DrvHostAudioDSound.cpp \
153 $(VKAT_PATH_AUDIO)/DrvHostAudioWasApi.cpp
154ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
155 vkat_DEFS.win += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
156 vkat_SOURCES.win += \
157 $(VKAT_PATH_AUDIO)/DrvHostAudioDSoundMMNotifClient.cpp
158endif
159
160vkat_SOURCES.darwin = \
161 $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudio.cpp \
162 $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudioAuth.mm
163vkat_LDFLAGS.darwin = \
164 -framework CoreAudio \
165 -framework AudioUnit \
166 -framework AudioToolbox \
167 -framework Foundation
168ifn1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
169 vkat_LDFLAGS.darwin += \
170 -framework AVFoundation
171endif
172
173
174#
175# The additions variant of the audio test utility.
176#
177# We name it VBoxAudioTest though, to not clutter up Guest Additions
178# installations with cryptic binaries not sporting 'VBox' as prefix.
179#
180vkatadd_TEMPLATE = VBoxGuestR3Exe
181vkatadd_EXTENDS = vkat
182vkatadd_EXTENDS_BY = appending
183vkatadd_NAME = VBoxAudioTest
184vkatadd_SDKS = VBOX_ZLIB_STATIC
185vkatadd_LDFLAGS.darwin = -framework IOKit
186vkatadd_LIBS.solaris = m
187
188#
189# Build the valkit vkat to bin as VBoxAudioTest, so that it can be shipped with
190# the host installer too.
191#
192# Note: We also need to have this as a signed binary, so don't just copy the
193# vkat binary to bin/ directory but built this as an own binary.
194#
195ifdef VBOX_WITH_HOST_SHIPPING_AUDIO_TEST
196 ifn1of ($(KBUILD_TARGET), os2 freebsd netbsd openbsd)
197 ifndef VBOX_ONLY_ADDITIONS
198 vkathost_TEMPLATE := VBoxR3Static
199 vkathost_EXTENDS := vkat
200 vkathost_INST := $(INST_BIN)
201 vkathost_NAME := VBoxAudioTest
202 vkathost_SOURCES = \
203 $(vkat_SOURCES) \
204 $(VBOX_PATH_SRC_DEVICES)/build/VBoxDD.d
205 endif
206 endif
207endif
208
209if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK) \
210 && 0 ## @todo r=bird: Disabled because nobody really wants or needs to run this during build other than Andy.
211 ## And more importantly, it breaks the build (os2, bsd*).
212
213 PROGRAMS += tstVkatHostSelftest
214 tstVkatHostSelftest_EXTENDS = vkat
215 tstVkatHostSelftest_EXTENDS_BY = appending
216 tstVkatHostSelftest_INST = $(INST_TESTCASE)
217 tstVkatHostSelftest_DEFS.debug = VBOX_WITH_EF_WRAPS
218
219 TESTING += $(tstVkatHostSelftest_0_OUTDIR)/tstVkatHostSelftest.run
220 $$(tstVkatHostSelftest_0_OUTDIR)/tstVkatHostSelftest.run: $$(tstVkatHostSelftest_1_TARGET)
221 export VKAT_RELEASE_LOG=-all; $(tstVkatHostSelftest_1_TARGET) selftest
222 $(QUIET)$(APPEND) -t "$@" "done"
223
224endif
225
226include $(FILE_KBUILD_SUB_FOOTER)
227
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette