VirtualBox

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

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

Validation Kit/VKAT: Build the VBoxAudioTest[.exe] binary as an own binary instead of copying vkat to bin/, as we need this as a (correctly) signed executable in the host installer(s) if VBOX_WITH_HOST_SHIPPING_AUDIO_TEST is set [build fix].

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