1 | # $Id: Makefile.kmk 89684 2021-06-14 14:39:39Z 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 |
|
---|
27 | SUB_DEPTH = ../../../../..
|
---|
28 | include $(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 | #
|
---|
34 | ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED
|
---|
35 | include $(PATH_ROOT)/src/VBox/ValidationKit/Config.kmk
|
---|
36 | endif
|
---|
37 |
|
---|
38 |
|
---|
39 | #
|
---|
40 | # Append what we build here to PROGRAMS (at the top because it's a bit messy).
|
---|
41 | #
|
---|
42 | ifn1of ($(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
|
---|
55 | endif
|
---|
56 |
|
---|
57 |
|
---|
58 | #
|
---|
59 | # Utility to play sine wave to Default Audio Device.
|
---|
60 | #
|
---|
61 | if 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
|
---|
67 | endif
|
---|
68 |
|
---|
69 |
|
---|
70 | #
|
---|
71 | # The Validation Kit Audio Test (VKAT) utility.
|
---|
72 | #
|
---|
73 | VKAT_PATH_AUDIO = $(PATH_ROOT)/src/VBox/Devices/Audio
|
---|
74 | vkat_TEMPLATE = VBoxValidationKitR3
|
---|
75 | vkat_VBOX_IMPORT_CHECKER.win.x86 = nt4
|
---|
76 | vkat_DEFS = VBOX_AUDIO_VKAT IN_VMM_R3 IN_VMM_STATIC
|
---|
77 | vkat_INCS = \
|
---|
78 | $(PATH_ROOT)/src/VBox/Devices/build \
|
---|
79 | $(PATH_ROOT)/src/VBox/Devices
|
---|
80 | vkat_SOURCES = \
|
---|
81 | vkat.cpp \
|
---|
82 | vkatCommon.cpp \
|
---|
83 | vkatCmdGeneric.cpp \
|
---|
84 | vkatDriverStack.cpp \
|
---|
85 | $(VKAT_PATH_AUDIO)/AudioTest.cpp \
|
---|
86 | $(VKAT_PATH_AUDIO)/DrvAudio.cpp \
|
---|
87 | $(VKAT_PATH_AUDIO)/DrvHostAudioNull.cpp \
|
---|
88 | $(VKAT_PATH_AUDIO)/AudioMixer.cpp \
|
---|
89 | $(VKAT_PATH_AUDIO)/AudioMixBuffer.cpp \
|
---|
90 | $(VKAT_PATH_AUDIO)/AudioHlp.cpp
|
---|
91 |
|
---|
92 | # Self-test stuff.
|
---|
93 | vkat_DEFS += VBOX_WITH_AUDIO_VALIDATIONKIT
|
---|
94 | vkat_SOURCES += \
|
---|
95 | vkatCmdSelfTest.cpp \
|
---|
96 | $(VKAT_PATH_AUDIO)/DrvHostAudioValidationKit.cpp \
|
---|
97 | $(VKAT_PATH_AUDIO)/AudioTestService.cpp \
|
---|
98 | $(VKAT_PATH_AUDIO)/AudioTestServiceClient.cpp \
|
---|
99 | $(VKAT_PATH_AUDIO)/AudioTestServiceProtocol.cpp \
|
---|
100 | $(VKAT_PATH_AUDIO)/AudioTestServiceTcp.cpp
|
---|
101 |
|
---|
102 | ifdef VBOX_WITH_AUDIO_PULSE
|
---|
103 | vkat_DEFS += VBOX_WITH_AUDIO_PULSE
|
---|
104 | vkat_SOURCES += \
|
---|
105 | $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudioStubs.cpp \
|
---|
106 | $(VKAT_PATH_AUDIO)/DrvHostAudioPulseAudio.cpp
|
---|
107 | endif
|
---|
108 |
|
---|
109 | ifdef VBOX_WITH_AUDIO_ALSA
|
---|
110 | vkat_DEFS += VBOX_WITH_AUDIO_ALSA
|
---|
111 | vkat_SOURCES += \
|
---|
112 | $(VKAT_PATH_AUDIO)/DrvHostAudioAlsa.cpp \
|
---|
113 | $(VKAT_PATH_AUDIO)/DrvHostAudioAlsaStubs.cpp
|
---|
114 | endif
|
---|
115 |
|
---|
116 | ifdef VBOX_WITH_AUDIO_OSS
|
---|
117 | vkat_DEFS += VBOX_WITH_AUDIO_OSS
|
---|
118 | vkat_SOURCES += \
|
---|
119 | $(VKAT_PATH_AUDIO)/DrvHostAudioOss.cpp
|
---|
120 | endif
|
---|
121 |
|
---|
122 | vkat_SOURCES.win += \
|
---|
123 | $(VKAT_PATH_AUDIO)/DrvHostAudioDSound.cpp \
|
---|
124 | $(VKAT_PATH_AUDIO)/DrvHostAudioWasApi.cpp
|
---|
125 | ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
|
---|
126 | vkat_DEFS.win += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
|
---|
127 | vkat_SOURCES.win += \
|
---|
128 | $(VKAT_PATH_AUDIO)/DrvHostAudioDSoundMMNotifClient.cpp
|
---|
129 | endif
|
---|
130 |
|
---|
131 | vkat_SOURCES.darwin = \
|
---|
132 | $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudio.cpp \
|
---|
133 | $(VKAT_PATH_AUDIO)/DrvHostAudioCoreAudioAuth.mm
|
---|
134 | vkat_LDFLAGS.darwin = \
|
---|
135 | -framework CoreAudio \
|
---|
136 | -framework AudioUnit \
|
---|
137 | -framework AudioToolbox \
|
---|
138 | -framework Foundation
|
---|
139 | ifn1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
|
---|
140 | vkat_LDFLAGS.darwin += \
|
---|
141 | -framework AVFoundation
|
---|
142 | endif
|
---|
143 |
|
---|
144 |
|
---|
145 | #
|
---|
146 | # The additions variant of the audio test utility.
|
---|
147 | #
|
---|
148 | # We name it VBoxAudioTest though, to not clutter up Guest Additions installations
|
---|
149 | # (all VBox binaries have the VBox prefix).
|
---|
150 | #
|
---|
151 | vkatadd_EXTENDS = vkat
|
---|
152 | vkatadd_EXTENDS_BY = appending
|
---|
153 | vkatadd_NAME = VBoxAudioTest$(HOSTSUFF_EXE)
|
---|
154 | vkatadd_TEMPLATE = VBoxGuestR3Exe
|
---|
155 | vkatadd_SDKS = VBOX_ZLIB_STATIC
|
---|
156 | vkatadd_LDFLAGS.darwin = -framework IOKit
|
---|
157 | vkatadd_LIBS.solaris = m
|
---|
158 |
|
---|
159 |
|
---|
160 | #
|
---|
161 | # Copy the valkit vkat to bin so it can be shipped with the host installer too.
|
---|
162 | # We name it VBoxAudioTest though, to not clutter up host installations.
|
---|
163 | #
|
---|
164 | ifdef VBOX_WITH_HOST_SHIPPING_AUDIO_TEST
|
---|
165 | ifn1of ($(KBUILD_TARGET), os2 freebsd netbsd openbsd)
|
---|
166 | ifndef VBOX_ONLY_ADDITIONS
|
---|
167 | INSTALLS += vkathost
|
---|
168 | vkathost_TEMPLATE = VBOXR3EXE
|
---|
169 | vkathost_SOURCES = $(vkat_1_TARGET)=>VBoxAudioTest$(HOSTSUFF_EXE)
|
---|
170 | endif
|
---|
171 | endif
|
---|
172 | endif
|
---|
173 |
|
---|
174 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
175 |
|
---|