VirtualBox

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

Last change on this file since 92723 was 92138, checked in by vboxsync, 3 years ago

Audio/Validation Kit: Reverted r147958 again, doesn't work on older build stuff. bugref:10008

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