VirtualBox

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

Last change on this file since 104620 was 98418, checked in by vboxsync, 20 months ago

ValKit/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 KB
Line 
1# $Id: Makefile.kmk 98418 2023-02-01 21:29:03Z 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 if defined(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST) && !defined(VBOX_ONLY_BUILD)
63 PROGRAMS += vkathost
64 endif
65 endif
66 if defined(VBOX_WITH_ADDITIONS_SHIPPING_AUDIO_TEST) \
67 && defined(VBOX_WITH_ADDITIONS) \
68 && !defined(VBOX_WITH_ADDITIONS_FROM_BUILD_SERVER) \
69 && (defined(VBOX_ONLY_ADDITIONS) || !defined(VBOX_ONLY_BUILD))
70 PROGRAMS += vkatadd
71 endif
72endif
73
74
75#
76# Utility to play sine wave to Default Audio Device.
77#
78if 0 # Disabled for now; does not work without WinMM.dll import validator files.
79 PROGRAMS.win += ntPlayToneWaveX
80 ntPlayToneWaveX_TEMPLATE = VBoxValidationKitR3
81 ntPlayToneWaveX_SOURCES = ntPlayToneWaveX.cpp
82 ntPlayToneWaveX_LIBS += \
83 WinMM.Lib
84endif
85
86
87#
88# The Validation Kit Audio Test (VKAT) utility.
89#
90vkat_TEMPLATE = VBoxValidationKitR3
91vkat_VBOX_IMPORT_CHECKER.win.x86 = nt4
92vkat_DEFS = VBOX_AUDIO_VKAT IN_VMM_R3 IN_VMM_STATIC
93vkat_INCS = \
94 $(PATH_ROOT)/src/VBox/Devices/build \
95 $(PATH_ROOT)/src/VBox/Devices \
96 $(PATH_ROOT)/src/VBox/Devices/Audio
97vkat_SOURCES = \
98 vkat.cpp \
99 vkatCommon.cpp \
100 vkatCmdGeneric.cpp \
101 vkatDriverStack.cpp \
102 $(VKAT_PATH_AUDIO)/AudioTest.cpp \
103 $(VKAT_PATH_AUDIO)/DrvAudio.cpp \
104 $(VKAT_PATH_AUDIO)/DrvHostAudioNull.cpp \
105 $(VKAT_PATH_AUDIO)/AudioMixer.cpp \
106 $(VKAT_PATH_AUDIO)/AudioMixBuffer.cpp \
107 $(VKAT_PATH_AUDIO)/AudioHlp.cpp
108
109# Debug stuff.
110ifdef VBOX_WITH_AUDIO_DEBUG
111 vkat_DEFS += VBOX_WITH_AUDIO_DEBUG
112 vkat_SOURCES += \
113 $(VKAT_PATH_AUDIO)/DrvHostAudioDebug.cpp
114endif
115
116# Self-test stuff.
117vkat_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
118vkat_SOURCES += \
119 vkatCmdSelfTest.cpp \
120 $(VKAT_PATH_AUDIO)/DrvHostAudioValidationKit.cpp \
121 $(VKAT_PATH_AUDIO)/AudioTestService.cpp \
122 $(VKAT_PATH_AUDIO)/AudioTestServiceClient.cpp \
123 $(VKAT_PATH_AUDIO)/AudioTestServiceProtocol.cpp \
124 $(VKAT_PATH_AUDIO)/AudioTestServiceTcp.cpp
125
126ifdef VBOX_WITH_AUDIO_PULSE
127 vkat_DEFS += VBOX_WITH_AUDIO_PULSE
128 vkat_SOURCES += \
129 $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudioStubs.cpp \
130 $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudio.cpp
131endif
132
133ifdef VBOX_WITH_AUDIO_ALSA
134 vkat_DEFS += VBOX_WITH_AUDIO_ALSA
135 vkat_SOURCES += \
136 $(VKAT_PATH_AUDIO)/DrvHostAudioAlsa.cpp \
137 $(VKAT_PATH_AUDIO)/DrvHostAudioAlsaStubs.cpp
138endif
139
140ifdef VBOX_WITH_AUDIO_OSS
141 vkat_DEFS += VBOX_WITH_AUDIO_OSS
142 vkat_SOURCES += \
143 $(VKAT_PATH_AUDIO)/DrvHostAudioOss.cpp
144endif
145
146vkat_SOURCES.win += \
147 $(VKAT_PATH_AUDIO)/DrvHostAudioDSound.cpp \
148 $(VKAT_PATH_AUDIO)/DrvHostAudioWasApi.cpp
149ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
150 vkat_DEFS.win += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
151 vkat_SOURCES.win += \
152 $(VKAT_PATH_AUDIO)/DrvHostAudioDSoundMMNotifClient.cpp
153endif
154
155vkat_SOURCES.darwin = \
156 $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudio.cpp \
157 $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudioAuth.mm
158vkat_LDFLAGS.darwin = \
159 -framework CoreAudio \
160 -framework AudioUnit \
161 -framework AudioToolbox \
162 -framework Foundation
163ifn1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
164 vkat_LDFLAGS.darwin += \
165 -framework AVFoundation
166endif
167
168
169#
170# The additions variant of the audio test utility.
171#
172# We name it VBoxAudioTest though, to not clutter up Guest Additions
173# installations with cryptic binaries not sporting 'VBox' as prefix.
174#
175vkatadd_TEMPLATE = VBoxGuestR3Exe
176vkatadd_EXTENDS = vkat
177vkatadd_EXTENDS_BY = appending
178vkatadd_NAME = VBoxAudioTest
179vkatadd_SDKS = VBoxZlibStatic
180vkatadd_LDFLAGS.darwin = -framework IOKit
181vkatadd_LIBS.solaris = m
182
183
184#
185# Build the valkit vkat to bin as VBoxAudioTest, so that it can be shipped with
186# the host installer too.
187#
188# Note: We also need to have this as a signed binary, so don't just copy the
189# vkat binary to bin/ directory but built this as an own binary.
190#
191vkathost_TEMPLATE := VBoxR3Exe
192vkathost_EXTENDS := vkat
193vkathost_INST := $(INST_BIN)
194vkathost_NAME := VBoxAudioTest
195vkathost_SOURCES = \
196 $(vkat_SOURCES) \
197 $(VBOX_PATH_SRC_DEVICES)/build/VBoxDD.d
198vkathost_LIBS = \
199 $(LIB_RUNTIME)
200
201
202if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK) \
203 && 0 ## @todo r=bird: Disabled because nobody really wants or needs to run this during build other than Andy.
204 ## And more importantly, it breaks the build (os2, bsd*).
205
206 PROGRAMS += tstVkatHostSelftest
207 tstVkatHostSelftest_EXTENDS = vkat
208 tstVkatHostSelftest_EXTENDS_BY = appending
209 tstVkatHostSelftest_INST = $(INST_TESTCASE)
210 tstVkatHostSelftest_DEFS.debug = VBOX_WITH_EF_WRAPS
211
212 TESTING += $(tstVkatHostSelftest_0_OUTDIR)/tstVkatHostSelftest.run
213 $$(tstVkatHostSelftest_0_OUTDIR)/tstVkatHostSelftest.run: $$(tstVkatHostSelftest_1_TARGET)
214 export VKAT_RELEASE_LOG=-all; $(tstVkatHostSelftest_1_TARGET) selftest
215 $(QUIET)$(APPEND) -t "$@" "done"
216
217endif
218
219include $(FILE_KBUILD_SUB_FOOTER)
220
Note: See TracBrowser for help on using the repository browser.

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