VirtualBox

source: vbox/trunk/src/VBox/Devices/Makefile.kmk@ 55364

Last change on this file since 55364 was 55349, checked in by vboxsync, 10 years ago

Devices: re-add VirtualKD which was removed by accident

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.9 KB
Line 
1# $Id: Makefile.kmk 55349 2015-04-21 10:08:09Z vboxsync $
2## @file
3# Top-level sub-makefile for the devices, drivers and services.
4#
5
6#
7# Copyright (C) 2006-2015 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
18SUB_DEPTH = ../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21# Make sure our Config.kmk is included.
22ifndef VBOX_DEVICES_CONFIG_KMK_INCLUDED
23 include $(PATH_SUB_CURRENT)/Config.kmk
24endif
25
26# Include sub-makefiles.
27include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
28ifdef VBOX_WITH_PDM_AUDIO_DRIVER
29 include $(PATH_SUB_CURRENT)/Audio/testcase/Makefile.kmk
30endif
31include $(PATH_SUB_CURRENT)/Input/testcase/Makefile.kmk
32if defined(VBOX_WITH_INTEL_PXE) || defined(VBOX_ONLY_EXTPACKS)
33 include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
34else if defined(VBOX_WITH_PXE_ROM)
35 if !defined(VBOX_WITHOUT_IPXE)
36 include $(PATH_SUB_CURRENT)/PC/ipxe/Makefile.kmk
37 endif
38endif
39if !defined(VBOX_ONLY_EXTPACKS) # Goes on almost to the end of the file.
40 include $(PATH_SUB_CURRENT)/BiosCommonCode/Makefile.kmk
41 include $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
42 include $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
43
44 #
45 # Main targets.
46 #
47 LIBRARIES += ServicesR0
48 DLLS += VBoxDDU VBoxDD VBoxDD2
49 SYSMODS += VBoxDDR0 VBoxDD2R0
50 ifdef VBOX_WITH_RAW_MODE
51 SYSMODS += VBoxDDGC VBoxDD2GC
52 endif
53
54
55 #
56 # VBoxDDU (shared object)
57 #
58 VBoxDDU_TEMPLATE = VBoxR3DllWarnNoPic
59 VBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
60 VBoxDDU_INST.darwin = $(INST_DLL) $(INST_TESTCASE)
61 VBoxDDU_DEFS = IN_VBOXDDU
62 ifdef VBOX_WITH_VUSB
63 VBoxDDU_DEFS += VBOX_WITH_VUSB
64 endif
65 ifdef VBOX_WITH_USB
66 VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
67 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
68 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
69 VBoxDDU_DEFS += VBOX_WITH_EHCI_IMPL
70 endif
71 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
72 VBoxDDU_DEFS += VBOX_WITH_XHCI_IMPL
73 endif
74 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
75 VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
76 endif
77 else
78 VBoxDDU_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK)
79 endif
80 VBoxDDU_SOURCES = \
81 Storage/VSCSI/VSCSIDevice.cpp \
82 Storage/VSCSI/VSCSILun.cpp \
83 Storage/VSCSI/VSCSILunSbc.cpp \
84 Storage/VSCSI/VSCSILunMmc.cpp \
85 Storage/VSCSI/VSCSISense.cpp \
86 Storage/VSCSI/VSCSIIoReq.cpp \
87 Storage/VSCSI/VSCSIVpdPagePool.cpp \
88 build/VBoxDDUDeps.cpp
89 VBoxDDU_SOURCES.win = \
90 build/VBoxDDU.rc
91 ifdef VBOX_WITH_USB
92 VBoxDDU_INCS.os2 += \
93 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
94 endif
95 VBoxDDU_LIBS = \
96 $(LIB_RUNTIME) \
97 $(PATH_STAGE_LIB)/StorageLib$(VBOX_SUFF_LIB)
98 ifdef VBOX_WITH_USB
99 VBoxDDU_LIBS += \
100 $(PATH_STAGE_LIB)/USBLib$(VBOX_SUFF_LIB)
101 VBoxDDU_LIBS.win += \
102 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
103 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib
104 endif
105 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
106 ifdef VBOX_WITH_USB
107 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
108 VBoxDDU_LDFLAGS.darwin += -framework IOKit
109 endif
110 endif
111
112 VBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
113
114 #
115 # VBoxDD (shared object)
116 #
117 VBoxDD_TEMPLATE = VBoxR3DllWarnNoPic
118 VBoxDD_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
119 Storage/DrvHostDVD.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK)
120 VBoxDD_INCS = \
121 build \
122 Network/slirp
123 VBoxDD_DEFS = \
124 VBOX_ACPI \
125 VBOX_HGCM_HOST_CODE \
126 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
127 $(if $(VBOX_BIOS_DMI_FALLBACK),VBOX_BIOS_DMI_FALLBACK,) \
128 VBOX_WITH_DMI_CHASSIS \
129 VBOX_WITH_DMI_OEMSTRINGS
130 VBoxDD_DEFS.win = _WIN32_WINNT=0x0510
131 ifeq ($(KBUILD_TARGET_ARCH),x86)
132 VBoxDD_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
133 endif
134 VBoxDD_SOURCES = \
135 build/VBoxDD.cpp \
136 \
137 Input/DevPS2.cpp \
138 Input/PS2K.cpp \
139 Input/PS2M.cpp \
140 Input/UsbKbd.cpp \
141 Input/UsbMouse.cpp \
142 Bus/DevPCI.cpp \
143 Bus/DevPciIch9.cpp \
144 Bus/MsiCommon.cpp \
145 Bus/MsixCommon.cpp \
146 EFI/DevSmc.cpp \
147 Graphics/DevVGA.cpp \
148 Storage/DevATA.cpp \
149 PC/DevPit-i8254.cpp \
150 PC/DevPIC.cpp \
151 PC/DevACPI.cpp \
152 PC/ACPI/VBoxAcpi.cpp \
153 PC/DevRTC.cpp \
154 PC/DevPcBios.cpp \
155 PC/DevFwCommon.cpp \
156 PC/DevPcArch.cpp \
157 GIMDev/GIMDev.cpp \
158 VMMDev/VMMDev.cpp \
159 $(if $(VBOX_WITH_HGCM),VMMDev/VMMDevHGCM.cpp,) \
160 VMMDev/VMMDevTesting.cpp \
161 Network/DevPCNet.cpp \
162 Audio/DevIchAc97.cpp \
163 Audio/DevSB16.cpp \
164 Audio/DevIchHda.cpp \
165 Audio/DevIchHdaCodec.cpp \
166 PC/DevDMA.cpp \
167 PC/DevHPET.cpp \
168 Storage/DevFdc.cpp \
169 Serial/DevSerial.cpp \
170 Parallel/DevParallel.cpp \
171 \
172 Input/DrvKeyboardQueue.cpp \
173 Input/DrvMouseQueue.cpp \
174 Network/DrvIntNet.cpp \
175 Network/DrvDedicatedNic.cpp \
176 PC/DrvACPI.cpp \
177 PC/DrvAcpiCpu.cpp \
178 Serial/DrvChar.cpp \
179 Serial/DrvNamedPipe.cpp \
180 Serial/DrvTCP.cpp \
181 Serial/DrvRawFile.cpp \
182 Storage/DrvBlock.cpp \
183 Storage/DrvMediaISO.cpp \
184 Storage/DrvRawImage.cpp \
185 Storage/Debug.cpp \
186 Storage/DrvVD.cpp \
187 Storage/ATAPIPassthrough.cpp \
188 Network/DrvNetSniffer.cpp \
189 Network/Pcap.cpp
190 VBoxDD_SOURCES.win = \
191 build/VBoxDD.rc
192 ifn1of ($(KBUILD_TARGET), os2)
193 VBoxDD_SOURCES += Storage/DrvHostBase.cpp
194 endif
195 ifn1of ($(KBUILD_TARGET), os2)
196 VBoxDD_SOURCES += Storage/DrvHostDVD.cpp
197 endif
198 ifn1of ($(KBUILD_TARGET), darwin freebsd os2 solaris)
199 VBoxDD_SOURCES += Storage/DrvHostFloppy.cpp
200 endif
201
202 VBoxDD_LIBS = # more later.
203 VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \
204 -framework CoreAudio \
205 -framework AudioUnit \
206 -framework AudioToolbox \
207 -framework IOKit \
208 -framework Carbon \
209 -framework DiskArbitration \
210 -framework SystemConfiguration
211 VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
212
213 # --- Tracing bits. ---
214
215 ifdef VBOX_WITH_DTRACE_R3
216 VBoxDD_DEFS += VBOX_WITH_DTRACE
217 VBoxDD_USES += dtrace
218 VBoxDD_SOURCES += build/VBoxDD.d
219 endif
220
221 # --- Graphics bits. ---
222
223 ifdef VBOX_WITH_CRHGSMI
224 VBoxDD_DEFS += VBOX_WITH_CRHGSMI
225 endif
226 ifdef VBOXWDDM_TEST_UHGSMI
227 VBoxDD_DEFS += VBOXWDDM_TEST_UHGSMI
228 endif
229 ifdef VBOXWDDM_WITH_VBVA
230 VBoxDD_DEFS += VBOXWDDM_WITH_VBVA
231 endif
232 ifdef VBOX_WITH_VIDEOHWACCEL
233 VBoxDD_DEFS += VBOX_WITH_VIDEOHWACCEL
234 endif
235
236 ifdef VBOX_WITH_HGSMI
237 VBoxDD_DEFS += VBOX_WITH_HGSMI
238 VBoxDD_SOURCES += \
239 Graphics/DevVGA_VBVA.cpp \
240 Graphics/HGSMI/HGSMIHost.cpp
241 VBoxDD_LIBS += \
242 $(PATH_STAGE_LIB)/HGSMIHostR3Lib$(VBOX_SUFF_LIB)
243 endif
244
245 ifdef VBOX_WITH_WDDM
246 VBoxDD_DEFS += VBOX_WITH_WDDM
247 VBoxDD_SOURCES += \
248 Graphics/HGSMI/SHGSMIHost.cpp
249 endif
250
251 ifdef VBOX_WITH_VMSVGA
252 VBoxDD_DEFS += VBOX_WITH_VMSVGA
253 VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp
254 endif
255 ifdef VBOX_WITH_VMSVGA3D
256 VBoxDD_DEFS += VBOX_WITH_VMSVGA3D
257 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-shared.cpp
258 ifeq ($(KBUILD_TARGET),win) # (Disable this to work with OpenGL on Windows.)
259 VBoxDD_SOURCES += Graphics/DevVGA-SVGA3d-win.cpp
260 VBoxDD_LIBS.win += d3d9.lib $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
261 VBoxDD_LDFLAGS.win += /DELAYLOAD:d3d9.dll
262 else
263 VBoxDD_SOURCES += \
264 Graphics/DevVGA-SVGA3d-ogl.cpp \
265 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
266 VBoxDD_SOURCES.darwin += \
267 $(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm
268 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm
269 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3D.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
270 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
271 $(QUIET)$(RM) -f -- "$@"
272 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3D --output "$@" $(filter %.def, $^)
273 $$(VBoxDD_0_OUTDIR)/VBoxSVGA3DObjCLazyLoad.asm: $(PATH_SUB_CURRENT)/Graphics/VBoxSVGA3DObjC.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@)
274 $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxDD,$(filter %.def, $^),$@)
275 $(QUIET)$(RM) -f -- "$@"
276 $(VBOX_DEF_2_LAZY_LOAD) --explicit-load-function --library VBoxSVGA3DObjC --output "$@" $(filter %.def, $^)
277
278 VBoxDD_LIBS.linux += GL X11
279 VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
280 VBoxDD_LDFLAGS.darwin += -framework OpenGL
281 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
282 if 0 # Use the OpenGL 3.2 Core profile (see also VBoxSVGA3D_DEFS.darwin and VBoxSVGA3DObjC_DEFS.darwin).
283 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
284 else
285 VBoxDD_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
286 endif
287 endif
288 Graphics/DevVGA-SVGA3d-ogl.cpp_CXXFLAGS.darwin = -F$(VBOX_PATH_MACOSX_SDK_10_7)/System/Library/Frameworks/
289 endif
290
291 ifdef VBOX_WITH_VDMA
292 VBoxDD_DEFS += VBOX_WITH_VDMA
293 VBoxDD_SOURCES += \
294 Graphics/DevVGA_VDMA.cpp
295 endif
296
297 ifdef VBOX_VDMA_WITH_WATCHDOG
298 VBoxDD_DEFS += VBOX_VDMA_WITH_WATCHDOG
299 endif
300
301 ifdef VBOX_WITH_PXE_ROM
302 VBoxDD_DEFS += VBOX_WITH_PXE_ROM
303 endif
304
305 # --- USB bits. ---
306
307 ifdef VBOX_WITH_USB
308 VBoxDD_DEFS += VBOX_WITH_USB
309 VBoxDD_SOURCES += \
310 USB/vrdp/USBProxyDevice-vrdp.cpp
311
312 VBoxDD_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
313 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
314 VBoxDD_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
315 endif
316 VBoxDD_SOURCES.darwin += \
317 USB/USBProxyDevice.cpp \
318 USB/darwin/USBProxyDevice-darwin.cpp
319
320 VBoxDD_DEFS.linux += \
321 VUSB_HAVE_USBPROXY_DEVICE \
322 $(if $(VBOX_WITH_LINUX_COMPILER_H),VBOX_WITH_LINUX_COMPILER_H,) \
323 $(if $(VBOX_USB_WITH_SYSFS),VBOX_USB_WITH_SYSFS,)
324 VBoxDD_SOURCES.linux += \
325 USB/USBProxyDevice.cpp \
326 USB/linux/USBProxyDevice-linux.cpp
327
328 VBoxDD_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
329 VBoxDD_INCS.os2 += $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/os2
330 VBoxDD_SOURCES.os2 += \
331 USB/USBProxyDevice.cpp \
332 USB/os2/USBProxyDevice-os2.cpp
333
334 VBoxDD_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
335 VBoxDD_SOURCES.win += \
336 USB/USBProxyDevice.cpp \
337 USB/win/USBProxyDevice-win.cpp
338
339 VBoxDD_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
340 VBoxDD_SOURCES.solaris+= \
341 USB/USBProxyDevice.cpp \
342 USB/solaris/USBProxyDevice-solaris.cpp
343
344 VBoxDD_DEFS.freebsd += VUSB_HAVE_USBPROXY_DEVICE
345 VBoxDD_SOURCES.freebsd+= \
346 USB/USBProxyDevice.cpp \
347 USB/freebsd/USBProxyDevice-freebsd.cpp
348
349 ifdef VBOX_WITH_SCSI
350 VBoxDD_SOURCES += \
351 Storage/UsbMsd.cpp
352 endif
353
354 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
355 VBoxDD_DEFS += VBOX_WITH_EHCI_IMPL
356 VBoxDD_SOURCES += \
357 USB/DevEHCI.cpp
358 endif
359
360 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
361 VBoxDD_DEFS += VBOX_WITH_XHCI_IMPL
362 VBoxDD_SOURCES += \
363 USB/DevXHCI.cpp
364 endif
365
366 if defined(VBOX_WITH_USB_VIDEO_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
367 if1of ($(KBUILD_TARGET), linux)
368 VBoxDD_DEFS += VBOX_WITH_USB_VIDEO_IMPL
369 VBoxDD_SOURCES += \
370 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcam.cpp \
371 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/UsbWebcamDesc.cpp \
372 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/jpggen.cpp \
373 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/DrvHostWebcam.cpp \
374 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp
375 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/JPEGEnc.cpp_INCS = \
376 $(PATH_ROOT)/src/libs/jpeg-8a
377 VBoxDD_SOURCES.linux += \
378 $(PATH_ROOT)/src/VBox/ExtPacks/Puel/UsbWebcam/DrvHostWebcam/HostWebcam-v4l2.cpp
379 VBoxDD_LIBS += \
380 $(PATH_STAGE_LIB)/VBox-libjpeg$(VBOX_SUFF_LIB)
381 endif
382 endif
383
384 endif # VBOX_WITH_USB
385
386 ifdef VBOX_WITH_VUSB
387 VBoxDD_DEFS += VBOX_WITH_VUSB
388 VBoxDD_SOURCES += \
389 USB/DevOHCI.cpp \
390 USB/DrvVUSBRootHub.cpp \
391 USB/VUSBDevice.cpp \
392 USB/VUSBReadAhead.cpp \
393 USB/VUSBUrb.cpp \
394 USB/VUSBSniffer.cpp
395 endif
396
397 # --- Networking bits. ---
398
399 ifdef VBOX_WITH_INIP
400 VBoxDD_DEFS += VBOX_WITH_INIP
401 VBoxDD_SOURCES += \
402 Network/DevINIP.cpp
403 ifndef VBOX_WITH_NEW_LWIP
404 include $(PATH_SUB_CURRENT)/Network/lwip/Makefile.kmk
405 VBoxDD_INCS += $(LWIP_INCS)
406 VBoxDD_SOURCES += $(LWIP_SOURCES)
407 else
408 # XXX: do not depend on order
409 ifndef LWIP_SOURCES
410 include $(PATH_SUB_CURRENT)/Network/lwip-new/Makefile.kmk
411 endif
412 Network/DevINIP.cpp_DEFS += VBOX_WITH_NEW_LWIP
413 VBoxDD_LWIP_INCS += Network # for lwipopts.h
414 $(eval $(call def_vbox_lwip_private, \
415 VBoxDD, Network/lwip-new))
416 $(eval $(call def_vbox_lwip_flags, \
417 VBoxDD, Network/DevINIP.cpp, Network/lwip-new))
418 endif
419 endif # VBOX_WITH_INIP
420
421 ifdef VBOX_WITH_E1000
422 VBoxDD_DEFS += VBOX_WITH_E1000
423 VBoxDD_SOURCES += \
424 Network/DevE1000.cpp \
425 Network/DevE1000Phy.cpp \
426 Network/DevEEPROM.cpp
427 endif
428
429 ifdef VBOX_WITH_VIRTIO
430 VBoxDD_DEFS += VBOX_WITH_VIRTIO
431 VBoxDD_SOURCES += \
432 VirtIO/Virtio.cpp \
433 Network/DevVirtioNet.cpp
434 endif
435
436 ifdef VBOX_WITH_UDPTUNNEL
437 VBoxDD_DEFS += VBOX_WITH_UDPTUNNEL
438 VBoxDD_SOURCES += \
439 Network/DrvUDPTunnel.cpp
440 endif
441
442 ifdef VBOX_WITH_VDE
443 VBoxDD_DEFS += VBOX_WITH_VDE
444 VBoxDD_SOURCES += \
445 Network/DrvVDE.cpp \
446 Network/VDEPlug.cpp
447 endif
448
449 ifdef VBOX_WITH_NETSHAPER
450 VBoxDD_DEFS += VBOX_WITH_NETSHAPER
451 VBoxDD_SOURCES += \
452 Network/DrvNetShaper.cpp
453 endif
454
455 # --- Storage bits. ---
456
457 ifdef VBOX_WITH_AHCI
458 VBoxDD_DEFS += VBOX_WITH_AHCI IN_AHCI_R3
459 VBoxDD_SOURCES += \
460 Storage/DevAHCI.cpp
461 endif
462
463 ifdef VBOX_WITH_BUSLOGIC
464 VBoxDD_DEFS += VBOX_WITH_BUSLOGIC
465 VBoxDD_SOURCES += \
466 Storage/DevBusLogic.cpp \
467 Storage/VBoxSCSI.cpp
468 endif
469
470 ifdef VBOX_WITH_LSILOGIC
471 VBoxDD_DEFS += VBOX_WITH_LSILOGIC
472 VBoxDD_SOURCES += \
473 Storage/DevLsiLogicSCSI.cpp
474 endif
475
476 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
477 VBoxDD_DEFS += VBOX_WITH_PDM_ASYNC_COMPLETION
478 endif
479
480 ifdef VBOX_WITH_SCSI
481 VBoxDD_DEFS += VBOX_WITH_SCSI
482 VBoxDD_SOURCES += \
483 Storage/DrvSCSI.cpp
484 VBoxDD_SOURCES.linux += \
485 Storage/DrvSCSIHost.cpp
486 endif
487
488 ifdef VBOX_WITH_ISCSI
489 ifdef VBOX_WITH_NEW_LWIP
490 Storage/DrvVD.cpp_DEFS += VBOX_WITH_NEW_LWIP
491 $(eval $(call def_vbox_lwip_flags, \
492 VBoxDD, Storage/DrvVD.cpp, Network/lwip-new))
493 else
494 Storage/DrvVD.cpp_INCS = $(LWIP_INCS)
495 endif
496 endif
497
498 ifdef VBOX_WITH_DRV_DISK_INTEGRITY
499 VBoxDD_DEFS += VBOX_WITH_DRV_DISK_INTEGRITY
500 VBoxDD_SOURCES += \
501 Storage/DrvDiskIntegrity.cpp
502 VBoxDD_LIBS += \
503 $(PATH_STAGE_LIB)/StorageDbgLib$(VBOX_SUFF_LIB)
504 endif
505
506 ifdef VBOX_WITH_EFI
507 VBoxDD_DEFS += VBOX_WITH_EFI
508 VBoxDD_SOURCES += EFI/DevEFI.cpp
509 EFI/DevEFI.cpp_INCS += EFI/Firmware/BaseTools/Source/C/Include
510 EFI/DevEFI.cpp_INCS.x86 += EFI/Firmware/BaseTools/Source/C/Include/Ia32
511 EFI/DevEFI.cpp_INCS.amd64 += EFI/Firmware/BaseTools/Source/C/Include/X64
512 endif
513
514 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
515 VBoxDD_DEFS += VBOX_WITH_PCI_PASSTHROUGH_IMPL
516 VBoxDD_SOURCES += \
517 Bus/DevPciRaw.cpp \
518 Bus/DrvPciRaw.cpp
519 endif
520
521 ifdef VBOX_WITH_MSI_DEVICES
522 VBoxDD_DEFS += VBOX_WITH_MSI_DEVICES
523 endif
524
525 ifdef VBOX_WITH_DYNAMIC_DSDT
526 VBoxDD_DEFS += VBOX_WITH_DYNAMIC_DSDT
527 endif
528
529
530 # --- Input bits. ---
531
532 ifdef VBOX_WITH_NEW_PS2M
533 VBoxDD_DEFS += VBOX_WITH_NEW_PS2M
534 endif
535
536
537 # --- Audio bits. ---
538
539 ifdef VBOX_WITH_PDM_AUDIO_DRIVER
540 VBoxDD_DEFS += VBOX_WITH_PDM_AUDIO_DRIVER
541 VBoxDD_SOURCES += \
542 Audio/AudioMixBuffer.cpp \
543 Audio/AudioMixer.cpp \
544 Audio/DrvAudio.cpp \
545 Audio/DrvAudioCommon.cpp \
546 Audio/DrvHostNullAudio.cpp
547
548 ifeq ($(KBUILD_TARGET),darwin)
549 VBoxDD_SOURCES += \
550 Audio/DrvHostCoreAudio.cpp
551 endif
552
553 ifeq ($(KBUILD_TARGET),win)
554 VBoxDD_SOURCES += \
555 Audio/DrvHostDSound.cpp
556 VBoxDD_LIBS += \
557 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dsound.lib
558 endif
559
560 ifeq ($(KBUILD_TARGET),linux)
561 VBoxDD_SOURCES += \
562 Audio/DrvHostOSSAudio.cpp
563
564 ifdef VBOX_WITH_PULSE
565 VBoxDD_DEFS += VBOX_WITH_PULSE
566 VBoxDD_SOURCES += \
567 Audio/DrvHostPulseAudio.cpp \
568 Audio/pulse_stubs.c
569 endif
570
571 ifdef VBOX_WITH_ALSA
572 VBoxDD_DEFS += VBOX_WITH_ALSA
573 VBoxDD_SOURCES += \
574 Audio/DrvHostALSAAudio.cpp \
575 Audio/alsa_stubs.c
576 endif
577 endif
578
579 ifeq ($(KBUILD_TARGET),freebsd)
580 VBoxDD_SOURCES += \
581 Audio/DrvHostOSSAudio.cpp
582 ifdef VBOX_WITH_PULSE
583 VBoxDD_DEFS += VBOX_WITH_PULSE
584 VBoxDD_SOURCES += \
585 Audio/DrvHostPulseAudio.cpp \
586 Audio/pulse_stubs.c
587 endif
588 endif
589
590 ifeq ($(KBUILD_TARGET),solaris)
591 ifdef VBOX_WITH_SOLARIS_OSS
592 VBoxDD_SOURCES += Audio/DrvHostOSSAudio.cpp
593 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
594 endif
595 endif
596
597 else # !VBOX_WITH_PDM_AUDIO_DRIVER
598
599 VBoxDD_SOURCES += \
600 Audio/audio.c \
601 Audio/audiosniffer.c \
602 Audio/noaudio.c \
603 Audio/filteraudio.c \
604 Audio/mixeng.c
605
606 ifeq ($(KBUILD_TARGET),win)
607 VBoxDD_SOURCES += \
608 Audio/dsoundaudio.c
609 endif
610
611 VBoxDD_SOURCES.darwin += \
612 Audio/coreaudio.c
613
614 ifeq ($(KBUILD_TARGET),solaris)
615 VBoxDD_SOURCES += \
616 Audio/solaudio.c
617 ifdef VBOX_WITH_SOLARIS_OSS
618 VBoxDD_DEFS += VBOX_WITH_SOLARIS_OSS
619 VBoxDD_SOURCES += \
620 Audio/ossaudio.c
621 endif
622 endif
623
624 ifeq ($(KBUILD_TARGET),linux)
625 VBoxDD_SOURCES += \
626 Audio/ossaudio.c
627 ifdef VBOX_WITH_PULSE
628 VBoxDD_DEFS += VBOX_WITH_PULSE
629 VBoxDD_SOURCES += \
630 Audio/pulseaudio.c \
631 Audio/pulse_stubs.c
632 endif
633 ifdef VBOX_WITH_ALSA
634 VBoxDD_DEFS += VBOX_WITH_ALSA
635 VBoxDD_SOURCES += \
636 Audio/alsaaudio.c \
637 Audio/alsa_stubs.c
638 endif
639 endif
640
641 ifeq ($(KBUILD_TARGET),freebsd)
642 VBoxDD_SOURCES += \
643 Audio/ossaudio.c
644 ifdef VBOX_WITH_PULSE
645 VBoxDD_DEFS += VBOX_WITH_PULSE
646 VBoxDD_SOURCES += \
647 Audio/pulseaudio.c \
648 Audio/pulse_stubs.c
649 endif
650 endif
651
652 endif # !VBOX_WITH_PDM_AUDIO_DRIVER
653
654 # --- WARNING! SLIRP MESS AHEAD! ;-) ---
655 VBOX_SLIRP_SOURCES = \
656 Network/DrvNAT.cpp \
657 Network/slirp/bootp.c \
658 Network/slirp/debug.c \
659 Network/slirp/ip_icmp.c \
660 Network/slirp/ip_input.c \
661 Network/slirp/ip_output.c \
662 Network/slirp/misc.c \
663 Network/slirp/sbuf.c \
664 Network/slirp/slirp.c \
665 Network/slirp/slirp_dns.c \
666 Network/slirp/socket.c \
667 Network/slirp/tcp_input.c \
668 Network/slirp/tcp_output.c \
669 Network/slirp/tcp_subr.c \
670 Network/slirp/tcp_timer.c \
671 Network/slirp/udp.c \
672 Network/slirp/dnsproxy/hash.c \
673 Network/slirp/tftp.c \
674 Network/slirp/dnsproxy/dnsproxy.c
675
676 ifeq ($(KBUILD_TARGET), win)
677 VBOX_SLIRP_SOURCES += Network/slirp/ip_icmpwin.c
678 else ifneq ($(KBUILD_TARGET),darwin)
679 # helper for debugging unprivileged
680# Network/slirp/ip_icmp.c_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
681# VBOX_SLIRP_SOURCES += ../NetworkServices/NAT/getrawsock.c
682 endif
683
684 ifneq ($(KBUILD_TARGET), win)
685 VBOX_SLIRP_SOURCES += Network/slirp/resolv_conf_parser.c
686 endif
687
688 ifdef VBOX_WITH_SLIRP_BSD_SBUF
689 VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c
690 endif
691 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH))
692 VBOX_SLIRP_BSD_SOURCES += \
693 Network/slirp/bsd/kern/kern_mbuf.c \
694 Network/slirp/bsd/kern/uipc_mbuf.c \
695 Network/slirp/bsd/kern/uipc_mbuf2.c \
696 Network/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/in_cksum.c
697 VBOX_SLIRP_ALIAS_SOURCES = \
698 Network/slirp/libalias/alias.c \
699 Network/slirp/libalias/alias_db.c \
700 Network/slirp/libalias/alias_mod.c \
701 Network/slirp/libalias/alias_proxy.c \
702 Network/slirp/libalias/alias_ftp.c \
703 Network/slirp/libalias/alias_dns.c \
704 Network/slirp/libalias/alias_nbt.c \
705 Network/slirp/libalias/alias_util.c
706
707 # Enable VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER here for a while, then move to
708 # $(file)_DEFS or clean the code disabled with this definition.
709 VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER=1
710
711 # dump memory related operations.
712 Network/slirp/misc.c_DEFS += $(if $(VBOX_NAT_MEM_DEBUG),VBOX_NAT_MEM_DEBUG,)
713
714 VBoxDD_SOURCES += $(VBOX_SLIRP_SOURCES)
715 define def_vbox_slirp_cflags
716 $(file)_DEFS += \
717 $(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \
718 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \
719 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \
720 $(if $(VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER),VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER,) \
721 $(if $(VBOX_WITH_NAT_UDP_SOCKET_CLONE),VBOX_WITH_NAT_UDP_SOCKET_CLONE,) \
722 $(if $(VBOX_WITH_NAT_SEND2HOME),VBOX_WITH_NAT_SEND2HOME,) \
723 $(if $(VBOX_WITH_HIDDEN_TCPTEMPLATE),VBOX_WITH_HIDDEN_TCPTEMPLATE,) \
724 $(if $(VBOX_WITH_SLIRP_MT),VBOX_WITH_SLIRP_MT,)
725 $(file)_INCS += \
726 $(1)/slirp/bsd/sys \
727 $(1)/slirp/bsd/sys/sys \
728 $(1)/slirp/bsd/$(VBOX_SLIRP_BSD_ARCH)/include \
729 $(1)/slirp/bsd/netinet \
730 $(1)/slirp \
731 $(1)/slirp/libalias
732 ifeq ($(KBUILD_TARGET),win)
733 $(file)_CFLAGS = -wd4018
734 else
735 $(file)_CFLAGS += -Wno-sign-compare -Wno-format -Wno-bad-function-cast
736 endif
737 endef
738
739 $(foreach file,$(VBOX_SLIRP_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
740
741 VBoxDD_SOURCES += $(VBOX_SLIRP_ALIAS_SOURCES)
742 define def_vbox_slirp_alias_cflags
743 $(file)_DEFS += VBOX_SLIRP_ALIAS \
744 $(if $(VBOX_WITH_DEBUG_LIBALIAS),VBOX_WITH_DEBUG_LIBALIAS,)
745 $(file)_INCS += \
746 $(1)/slirp/libalias \
747 $(1)/slirp \
748 $(1)/slirp/dnsproxy
749 ifneq ($(KBUILD_TARGET),win)
750 $(file)_CFLAGS += -Wno-shadow
751 endif
752 endef
753 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
754 $(foreach file,$(VBOX_SLIRP_ALIAS_SOURCES),$(eval $(call def_vbox_slirp_alias_cflags, Network)))
755
756 VBOX_SLIRP_BSD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES.${KBUILD_TARGET_ARCH})
757 VBoxDD_SOURCES += $(VBOX_SLIRP_BSD_SOURCES)
758 define def_vbox_slirp_bsd_cflags
759 $(file)_DEFS += VBOX_SLIRP_BSD
760 $(file)_INCS += $(1)/slirp/dnsproxy
761 endef
762 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_cflags, Network)))
763 $(foreach file,$(VBOX_SLIRP_BSD_SOURCES),$(eval $(call def_vbox_slirp_bsd_cflags, Network)))
764
765
766 # --- OS specific driver hacks. ---
767
768 ifeq ($(KBUILD_TARGET),darwin)
769 VBoxDD_SOURCES.darwin += Serial/DrvHostSerial.cpp
770 endif # darwin
771
772 ifeq ($(KBUILD_TARGET),freebsd)
773 VBoxDD_SOURCES += Serial/DrvHostSerial.cpp
774 VBoxDD_SOURCES.freebsd += Network/DrvTAP.cpp
775 endif # freebsd
776
777 VBoxDD_SOURCES.linux += \
778 Network/DrvTAP.cpp \
779 Parallel/DrvHostParallel.cpp \
780 Serial/DrvHostSerial.cpp
781
782 ifeq ($(KBUILD_TARGET),solaris)
783 VBoxDD_SOURCES.solaris += Serial/DrvHostSerial.cpp
784 ifdef VBOX_WITH_SUID_WRAPPER
785 VBoxDD_DEFS += VBOX_WITH_SUID_WRAPPER
786 endif
787 endif
788
789 VBoxDD_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
790 VBoxDD_SOURCES.win += \
791 Serial/DrvHostSerial.cpp \
792 Parallel/DrvHostParallel.cpp
793
794 ifdef VBOX_WITH_VIRTUALKD
795 VBoxDD_DEFS.win += VBOX_WITH_VIRTUALKD
796 VBoxDD_SOURCES.win += \
797 Misc/VirtualKD.cpp
798 endif
799
800 if defined(VBOX_WITH_NETFLT)
801 VBoxDD_DEFS += VBOX_WITH_NETFLT
802 if defined(VBOX_NETFLT_ONDEMAND_BIND)
803 VBoxDD_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
804 endif
805 endif
806
807
808 # --- Final bits, mostly libraries for order dependant linkers. ---
809
810 VBoxDD_LIBS += \
811 $(PATH_STAGE_LIB)/VgaDefBiosLogo$(VBOX_SUFF_LIB) \
812 $(LIB_VMM) \
813 $(LIB_RUNTIME)
814 ifeq ($(KBUILD_TARGET),win)
815 VBoxDD_LIBS += \
816 $(LIB_DDU) \
817 $(PATH_STAGE_LIB)/VBoxDD2.lib \
818 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dxguid.lib
819 else
820 VBoxDD_LIBS += \
821 $(VBoxDDU_1_STAGE_TARGET) \
822 $(VBoxDD2_1_STAGE_TARGET)
823 endif
824
825 ifdef VBOX_WITH_NETFLT
826 VBoxDD_LIBS.win += $(PATH_STAGE_LIB)/WinNetConfig.lib
827 endif
828
829 ifeq ($(KBUILD_TARGET),solaris)
830 VBoxDD_LIBS += adm
831 ifdef VBOX_WITH_SUID_WRAPPER
832 VBoxDD_LIBS += secdb
833 endif
834 ifdef VBOX_WITH_USB
835 VBoxDD_LIBS += aio
836 endif
837 endif
838
839 VBoxDD_LIBS.darwin += \
840 $(LIB_REM)
841
842
843 ifdef VBOX_WITH_DYNAMIC_DSDT
844 VBoxDD_CLEAN += $(VBoxDD_0_OUTDIR)/vboxdsl.hex
845 PC/ACPI/VBoxAcpi.cpp_DEPS = $(VBoxDD_0_OUTDIR)/vboxdsl.hex
846
847 $$(VBoxDD_0_OUTDIR)/vboxdsl.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
848 $(call MSG_TOOL,bin2c,VBoxDD,$<,$@)
849 $(QUIET)$(VBOX_BIN2C) -export VboxDslSource $< $@
850
851 vboxdsl.hex:: $$(VBoxDD_0_OUTDIR)/vboxdsl.hex
852
853 else # !VBOX_WITH_DYNAMIC_DSDT
854 # VBoxAcpi.cpp needs vboxaml.hex which we generate from PC/vbox.dsl
855 VBoxDD_CLEAN += \
856 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
857 $(VBoxDD_0_OUTDIR)/vboxaml.aml \
858 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
859 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml \
860 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.aml.tmp \
861 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex \
862 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml \
863 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.tmp \
864 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.aml.pre
865 PC/ACPI/VBoxAcpi.cpp_DEPS = \
866 $(VBoxDD_0_OUTDIR)/vboxaml.hex \
867 $(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex \
868 $(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
869
870 $$(VBoxDD_0_OUTDIR)/vboxaml.hex: $(PATH_SUB_CURRENT)/PC/vbox.dsl | $$(dir $$@)
871 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
872 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
873
874 vboxaml.hex:: $$(VBoxDD_0_OUTDIR)/vboxaml.hex
875
876 $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex: $(PATH_SUB_CURRENT)/PC/vbox-standard.dsl | $$(dir $$@)
877 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
878 $(QUIET)$(RM) -f $@ [email protected]
879 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
880 $(QUIET)$(MV) -f $@ [email protected]
881 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtStandard/g" \
882 --output $@ [email protected]
883 $(QUIET)$(RM) -f [email protected]
884
885
886 vboxssdt-standard.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-standard.hex
887
888 $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex: $(PATH_SUB_CURRENT)/PC/vbox-cpuhotplug.dsl | $$(dir $$@)
889 $(call MSG_TOOL,iasl,VBoxDD,$<,$@)
890 $(QUIET)$(RM) -f $@ [email protected] [email protected]
891 $(QUIET)$(TOOL_$(VBOX_GCC_TOOL)_CC) -E -P -x c -o [email protected] $<
892 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ [email protected]
893 $(QUIET)$(MV) -f $@ [email protected]
894 $(QUIET)$(SED) "s/AmlCode/AmlCodeSsdtCpuHotPlug/g" \
895 --output $@ [email protected]
896 $(QUIET)$(RM) -f [email protected] [email protected]
897
898
899 vboxssdt-cpuhotplug.hex:: $$(VBoxDD_0_OUTDIR)/vboxssdt-cpuhotplug.hex
900
901 endif # !VBOX_WITH_DYNAMIC_DSDT
902 PC/ACPI/VBoxAcpi.cpp_INCS = $(VBoxDD_0_OUTDIR)
903
904 # For finding PCIInternal.h from VBox/pci.h.
905 Bus/DevPCI.cpp_INCS = Bus
906 Bus/DevPciIch9.cpp_INCS = Bus
907 Bus/MsiCommon.cpp_INCS = Bus
908 Bus/MsixCommon.cpp_INCS = Bus
909 Bus/DevPciRaw.cpp_INCS = Bus
910
911 # For finding and generating vbetables.h (see Graphics/BIOS/Makefile.kmk).
912 Graphics/DevVGA.cpp_INCS = $(VgaBiosBin_0_OUTDIR)
913 Graphics/DevVGA.cpp_DEPS = $(VgaBiosBin_0_OUTDIR)/vbetables.h
914
915
916 ifdef VBOX_WITH_RAW_MODE
917 #
918 # VBoxDDGC (sysmod)
919 #
920 VBoxDDGC_TEMPLATE = VBoxRc
921 ifeq ($(KBUILD_TARGET_ARCH),x86)
922 VBoxDDGC_DEFS.darwin = VBOX_WITH_2X_4GB_ADDR_SPACE
923 endif
924 VBoxDDGC_DEFS = $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,)
925 VBoxDDGC_INCS = build
926 VBoxDDGC_SOURCES = \
927 Audio/DevIchHda.cpp \
928 Bus/DevPCI.cpp \
929 Bus/DevPciIch9.cpp \
930 Bus/MsiCommon.cpp \
931 Bus/MsixCommon.cpp \
932 EFI/DevSmc.cpp \
933 Graphics/DevVGA.cpp \
934 Input/DevPS2.cpp \
935 Input/PS2K.cpp \
936 Input/PS2M.cpp \
937 PC/DevACPI.cpp \
938 PC/DevPit-i8254.cpp \
939 PC/DevPIC.cpp \
940 PC/DevRTC.cpp \
941 PC/DevHPET.cpp \
942 Storage/DevATA.cpp \
943 Network/DevPCNet.cpp \
944 Serial/DevSerial.cpp \
945 Parallel/DevParallel.cpp \
946 VMMDev/VMMDevTesting.cpp
947
948 ifdef VBOX_WITH_E1000
949 VBoxDDGC_DEFS += VBOX_WITH_E1000
950 VBoxDDGC_SOURCES += \
951 Network/DevE1000.cpp \
952 Network/DevE1000Phy.cpp
953 endif
954
955 ifdef VBOX_WITH_VIRTIO
956 VBoxDDGC_DEFS += VBOX_WITH_VIRTIO
957 VBoxDDGC_SOURCES += \
958 VirtIO/Virtio.cpp \
959 Network/DevVirtioNet.cpp
960 endif
961
962 ifdef VBOX_WITH_HGSMI
963 VBoxDDGC_DEFS += VBOX_WITH_HGSMI
964 endif
965 ifdef VBOX_WITH_WDDM
966 VBoxDDGC_DEFS += VBOX_WITH_WDDM
967 endif
968 ifdef VBOX_WITH_VDMA
969 VBoxDDGC_DEFS += VBOX_WITH_VDMA
970 endif
971 ifdef VBOX_WITH_CRHGSMI
972 VBoxDDGC_DEFS += VBOX_WITH_CRHGSMI
973 endif
974 ifdef VBOXWDDM_WITH_VBVA
975 VBoxDDGC_DEFS += VBOXWDDM_WITH_VBVA
976 endif
977 ifdef VBOX_WITH_VMSVGA
978 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA
979 VBoxDDGC_SOURCES += \
980 Graphics/DevVGA-SVGA.cpp
981 endif
982 ifdef VBOX_WITH_VMSVGA3D
983 VBoxDDGC_DEFS += VBOX_WITH_VMSVGA3D
984 endif
985 ifdef VBOX_VDMA_WITH_WATCHDOG
986 VBoxDDGC_DEFS += VBOX_VDMA_WITH_WATCHDOG
987 endif
988
989 ifdef VBOX_WITH_VUSB
990 VBoxDDGC_DEFS += VBOX_WITH_VUSB
991 VBoxDDGC_SOURCES += \
992 USB/DevOHCI.cpp
993 endif
994
995 ifdef VBOX_WITH_USB
996 VBoxDDGC_DEFS += VBOX_WITH_USB
997 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
998 VBoxDDGC_DEFS += VBOX_WITH_EHCI_IMPL
999 VBoxDDGC_SOURCES += \
1000 USB/DevEHCI.cpp
1001 endif
1002 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1003 VBoxDDGC_DEFS += VBOX_WITH_XHCI_IMPL
1004 VBoxDDGC_SOURCES += \
1005 USB/DevXHCI.cpp
1006 endif
1007 endif
1008
1009 ifdef VBOX_WITH_VIDEOHWACCEL
1010 VBoxDDGC_DEFS += VBOX_WITH_VIDEOHWACCEL
1011 endif
1012
1013 ifdef VBOX_WITH_AHCI
1014 VBoxDDGC_DEFS += VBOX_WITH_AHCI IN_AHCI_GC
1015 VBoxDDGC_SOURCES += \
1016 Storage/DevAHCI.cpp
1017 endif
1018
1019 ifdef VBOX_WITH_BUSLOGIC
1020 VBoxDDGC_DEFS += VBOX_WITH_BUSLOGIC
1021 VBoxDDGC_SOURCES += \
1022 Storage/DevBusLogic.cpp
1023 endif
1024
1025 ifdef VBOX_WITH_LSILOGIC
1026 VBoxDDGC_DEFS += VBOX_WITH_LSILOGIC
1027 VBoxDDGC_SOURCES += \
1028 Storage/DevLsiLogicSCSI.cpp
1029 endif
1030
1031 ifdef VBOX_WITH_NEW_PS2M
1032 VBoxDDGC_DEFS += VBOX_WITH_NEW_PS2M
1033 endif
1034
1035 if1of ($(VBOX_LDR_FMT32), pe lx)
1036 VBoxDDGC_LIBS = \
1037 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1038 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1039 endif
1040 endif # VBOX_WITH_RAW_MODE
1041
1042
1043 #
1044 # VBoxDD2 (shared object)
1045 #
1046 VBoxDD2_TEMPLATE = VBoxR3DllWarnNoPic
1047 VBoxDD2_DEFS = IN_VBOXDD2
1048 VBoxDD2_INCS := \
1049 build \
1050 $(PATH_SUB_CURRENT)
1051 VBoxDD2_SOURCES = \
1052 build/VBoxDD2.cpp \
1053 PC/DevAPIC.cpp \
1054 PC/DevIoApic.cpp \
1055 PC/DevLPC.cpp
1056 VBoxDD2_SOURCES.win = \
1057 build/VBoxDD2.rc
1058 VBoxDD2_LIBS = \
1059 $(PATH_STAGE_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
1060 $(PATH_STAGE_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
1061 $(if $(VBOX_WITH_PXE_ROM),\
1062 $(if $(VBOX_WITH_INTEL_PXE),\
1063 $(PATH_STAGE_LIB)/NetBiosBin$(VBOX_SUFF_LIB),\
1064 $(PATH_STAGE_LIB)/iPxeBiosBin$(VBOX_SUFF_LIB)),) \
1065 $(LIB_VMM) \
1066 $(LIB_RUNTIME)
1067 VBoxDD2_LIBS.darwin += $(LIB_REM)
1068 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib
1069 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
1070
1071 ifdef VBOX_WITH_PXE_ROM
1072 VBoxDD2_DEFS += VBOX_WITH_PXE_ROM
1073 endif
1074
1075
1076 #
1077 # VBoxDDR0 (sysmod)
1078 #
1079 VBoxDDR0_TEMPLATE = VBoxR0
1080 VBoxDDR0_DEFS.darwin.x86= VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0 VBOX_WITH_2X_4GB_ADDR_SPACE
1081 VBoxDDR0_DEFS = IN_RT_R0 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) # - WTF is IN_RT_R0 doing here?
1082 VBoxDDR0_DEFS.win += VBOX_WITH_WIN_PARPORT_SUP
1083 VBoxDDR0_INCS = build
1084 VBoxDDR0_SDKS.win = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
1085 VBoxDDR0_SOURCES = \
1086 build/VBoxDDR0.cpp \
1087 Audio/DevIchHda.cpp \
1088 Bus/DevPCI.cpp \
1089 Bus/DevPciIch9.cpp \
1090 Bus/MsiCommon.cpp \
1091 Bus/MsixCommon.cpp \
1092 EFI/DevSmc.cpp \
1093 Graphics/DevVGA.cpp \
1094 Input/DevPS2.cpp \
1095 Input/PS2K.cpp \
1096 Input/PS2M.cpp \
1097 PC/DevACPI.cpp \
1098 PC/DevPit-i8254.cpp \
1099 PC/DevPIC.cpp \
1100 PC/DevRTC.cpp \
1101 PC/DevHPET.cpp \
1102 Storage/DevATA.cpp \
1103 Network/DevPCNet.cpp \
1104 Serial/DevSerial.cpp \
1105 Parallel/DevParallel.cpp \
1106 VMMDev/VMMDevTesting.cpp \
1107 \
1108 Network/DrvIntNet.cpp \
1109 Network/DrvDedicatedNic.cpp
1110
1111 VBoxDDR0_SOURCES.win += Parallel/DrvHostParallel.cpp
1112
1113 ifdef VBOX_WITH_E1000
1114 VBoxDDR0_DEFS += VBOX_WITH_E1000
1115 VBoxDDR0_SOURCES += \
1116 Network/DevE1000.cpp \
1117 Network/DevE1000Phy.cpp
1118 endif
1119
1120 ifdef VBOX_WITH_VIRTIO
1121 VBoxDDR0_DEFS += VBOX_WITH_VIRTIO
1122 VBoxDDR0_SOURCES += \
1123 VirtIO/Virtio.cpp \
1124 Network/DevVirtioNet.cpp
1125 endif
1126
1127 ifdef VBOX_WITH_NETSHAPER
1128 VBoxDDR0_DEFS += VBOX_WITH_NETSHAPER
1129 VBoxDDR0_SOURCES += \
1130 Network/DrvNetShaper.cpp
1131 endif
1132
1133 ifdef VBOX_WITH_VMSVGA
1134 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA
1135 VBoxDDR0_SOURCES += \
1136 Graphics/DevVGA-SVGA.cpp
1137 endif
1138 ifdef VBOX_WITH_VMSVGA3D
1139 VBoxDDR0_DEFS += VBOX_WITH_VMSVGA3D
1140 endif
1141
1142 ifdef VBOX_WITH_HGSMI
1143 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1144 endif
1145 ifdef VBOX_WITH_WDDM
1146 VBoxDDR0_DEFS += VBOX_WITH_WDDM
1147 endif
1148 ifdef VBOX_WITH_VDMA
1149 VBoxDDR0_DEFS += VBOX_WITH_VDMA
1150 endif
1151 ifdef VBOX_WITH_CRHGSMI
1152 VBoxDDR0_DEFS += VBOX_WITH_CRHGSMI
1153 endif
1154 ifdef VBOXWDDM_WITH_VBVA
1155 VBoxDDR0_DEFS += VBOXWDDM_WITH_VBVA
1156 endif
1157 ifdef VBOX_VDMA_WITH_WATCHDOG
1158 VBoxDDR0_DEFS += VBOX_VDMA_WITH_WATCHDOG
1159 endif
1160
1161 ifdef VBOX_WITH_VUSB
1162 VBoxDDR0_DEFS += VBOX_WITH_VUSB
1163 VBoxDDR0_SOURCES += \
1164 USB/DevOHCI.cpp
1165 endif
1166 ifdef VBOX_WITH_USB
1167 VBoxDDR0_DEFS += VBOX_WITH_USB
1168 if defined(VBOX_WITH_EHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1169 VBoxDDR0_DEFS += VBOX_WITH_EHCI_IMPL
1170 VBoxDDR0_SOURCES += \
1171 USB/DevEHCI.cpp
1172 endif
1173 if defined(VBOX_WITH_XHCI_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1174 VBoxDDR0_DEFS += VBOX_WITH_XHCI_IMPL
1175 VBoxDDR0_SOURCES += \
1176 USB/DevXHCI.cpp
1177 endif
1178 endif
1179
1180 if defined(VBOX_WITH_PCI_PASSTHROUGH_IMPL) && !defined(VBOX_WITH_EXTPACK_PUEL)
1181 VBoxDDR0_SOURCES += \
1182 Bus/DevPciRaw.cpp
1183 endif
1184
1185 ifdef VBOX_WITH_AHCI
1186 VBoxDDR0_DEFS += VBOX_WITH_AHCI IN_AHCI_R0
1187 VBoxDDR0_SOURCES += \
1188 Storage/DevAHCI.cpp
1189 endif
1190
1191 ifdef VBOX_WITH_BUSLOGIC
1192 VBoxDDR0_DEFS += VBOX_WITH_BUSLOGIC
1193 VBoxDDR0_SOURCES += \
1194 Storage/DevBusLogic.cpp
1195 endif
1196
1197 ifdef VBOX_WITH_LSILOGIC
1198 VBoxDDR0_DEFS += VBOX_WITH_LSILOGIC
1199 VBoxDDR0_SOURCES += \
1200 Storage/DevLsiLogicSCSI.cpp
1201 endif
1202
1203 ifdef VBOX_WITH_NEW_PS2M
1204 VBoxDDR0_DEFS += VBOX_WITH_NEW_PS2M
1205 endif
1206
1207 ifdef VBOX_WITH_HGSMI
1208 VBoxDDR0_DEFS += VBOX_WITH_HGSMI
1209 endif
1210 ifdef VBOX_WITH_VIDEOHWACCEL
1211 VBoxDDR0_DEFS += VBOX_WITH_VIDEOHWACCEL
1212 endif
1213
1214 if1of ($(VBOX_LDR_FMT), pe lx)
1215 VBoxDDR0_LIBS = \
1216 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1217 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1218 endif
1219
1220
1221 ifdef VBOX_WITH_RAW_MODE
1222 #
1223 # VBoxDD2GC (LGPL sysmod)
1224 #
1225 VBoxDD2GC_TEMPLATE = VBoxRc
1226 VBoxDD2GC_INCS = build
1227 VBoxDD2GC_SOURCES = \
1228 PC/DevAPIC.cpp \
1229 PC/DevIoApic.cpp
1230 if1of ($(VBOX_LDR_FMT32), pe lx)
1231 VBoxDD2GC_LIBS = \
1232 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
1233 $(PATH_STAGE_LIB)/VMMRCImp$(VBOX_SUFF_LIB)
1234 endif
1235 endif
1236
1237
1238 #
1239 # VBoxDD2R0 (LGPL sysmod)
1240 #
1241 VBoxDD2R0_TEMPLATE = VBoxR0
1242 VBoxDD2R0_DEFS = IN_RT_R0
1243 VBoxDD2R0_INCS = build
1244 VBoxDD2R0_SOURCES = \
1245 build/VBoxDD2R0.cpp \
1246 PC/DevAPIC.cpp \
1247 PC/DevIoApic.cpp \
1248
1249 if1of ($(VBOX_LDR_FMT), pe lx)
1250 VBoxDD2R0_LIBS = \
1251 $(PATH_STAGE_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
1252 $(PATH_STAGE_LIB)/SUPR0$(VBOX_SUFF_LIB)
1253 endif
1254
1255
1256 #
1257 # Ring-0 Services (library, linked into VMMR0.r0)
1258 #
1259 ServicesR0_TEMPLATE = VBoxR0
1260 ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0 \
1261 $(if $(VBOX_WITH_PCI_PASSTHROUGH),IN_PCIRAW_R0,) \
1262 $(if $(VBOX_WITH_NAT_SERVICE),VBOX_WITH_NAT_SERVICE,)
1263 ServicesR0_SOURCES = \
1264 Network/SrvIntNetR0.cpp \
1265 $(if $(VBOX_WITH_PCI_PASSTHROUGH),Bus/SrvPciRawR0.cpp,)
1266 Network/SrvIntNetR0.cpp_CXXFLAGS := $(if-expr $(KBUILD_TARGET) == "win",,$(VBOX_GCC_Wno-array_bounds))
1267
1268
1269 #
1270 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1271 #
1272 ifdef VBOX_WITH_TESTCASES
1273 PROGRAMS += tstIntNetR0
1274 tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
1275 tstIntNetR0_DEFS = IN_INTNET_R0
1276 tstIntNetR0_SOURCES = \
1277 Network/testcase/tstIntNetR0.cpp
1278 ifneq ($(KBUILD_TARGET),win)
1279 Network/testcase/tstIntNetR0.cpp_CXXFLAGS = $(VBOX_GCC_Wno-array_bounds)
1280 endif
1281 endif
1282
1283
1284 #
1285 # Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
1286 #
1287 ifdef VBOX_WITH_TESTCASES
1288 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
1289 PROGRAMS += tstIntNetHardened-1
1290 tstIntNetHardened-1_TEMPLATE = VBoxR3HardenedTstExe
1291 tstIntNetHardened-1_NAME = tstIntNet-1
1292 tstIntNetHardened-1_DEFS = PROGRAM_NAME_STR=\"tstIntNet-1\"
1293 tstIntNetHardened-1_SOURCES = ../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
1294
1295 DLLS += tstIntNet-1
1296 tstIntNet-1_TEMPLATE = VBoxR3TstDll
1297 else
1298 PROGRAMS += tstIntNet-1
1299 tstIntNet-1_TEMPLATE = VBOXR3TSTEXE
1300 endif
1301 tstIntNet-1_SOURCES = \
1302 Network/testcase/tstIntNet-1.cpp \
1303 Network/Pcap.cpp
1304 endif
1305
1306
1307 #
1308 # EEPROM device unit test requires cppunit
1309 #
1310 ifdef VBOX_WITH_CPPUNIT_TESTCASES
1311 ifdef VBOX_WITH_E1000
1312 PROGRAMS += tstDevEEPROM
1313 tstDevEEPROM_TEMPLATE = VBOXCPPUNITEXE
1314 tstDevEEPROM_SOURCES = \
1315 Network/testcase/tstDevEEPROM.cpp
1316 tstDevEEPROM_LIBS = \
1317 $(TARGET_VBoxDD)
1318 PROGRAMS += tstDevPhy
1319 tstDevPhy_TEMPLATE = VBOXCPPUNITEXE
1320 tstDevPhy_SOURCES = \
1321 Network/testcase/tstDevPhy.cpp \
1322 Network/DevE1000Phy.cpp
1323 tstDevPhy_DEFS = PHY_UNIT_TEST
1324 endif
1325 endif
1326
1327 #
1328 # Apple SMC Utility.
1329 #
1330 ifdef VBOX_WITH_TESTCASES
1331 PROGRAMS.darwin += VBoxSmcUtil-darwin
1332 VBoxSmcUtil-darwin_TEMPLATE = VBOXR3TSTEXE
1333 VBoxSmcUtil-darwin_SOURCES = EFI/VBoxSmcUtil-darwin.cpp
1334 VBoxSmcUtil-darwin_LDFLAGS = -framework IOKit
1335 endif
1336
1337endif # !VBOX_ONLY_EXTPACKS
1338
1339
1340if defined(VBOX_WITH_EXTPACK_PUEL) && defined(VBOX_WITH_EXTPACK_PUEL_BUILD)
1341 #
1342 # The EHCI (USB 2.0) Extension Pack Modules.
1343 #
1344 if defined(VBOX_WITH_USB)
1345 DLLS += VBoxEhciR3
1346 VBoxEhciR3_TEMPLATE = VBoxR3ExtPackPuel
1347 VBoxEhciR3_SOURCES = \
1348 USB/DevEHCI.cpp \
1349 USB/DevXHCI.cpp
1350 VBoxEhciR3_SOURCES.win = \
1351 build/VBoxEhciR3.rc
1352
1353 SYSMODS += VBoxEhciR0
1354 VBoxEhciR0_TEMPLATE = VBoxR0ExtPackPuel
1355 VBoxEhciR0_SOURCES = \
1356 USB/DevEHCI.cpp \
1357 USB/DevXHCI.cpp
1358
1359 ifdef VBOX_WITH_RAW_MODE
1360 SYSMODS += VBoxEhciRC
1361 VBoxEhciRC_TEMPLATE = VBoxRcExtPackPuel
1362 VBoxEhciRC_SOURCES = \
1363 USB/DevEHCI.cpp \
1364 USB/DevXHCI.cpp
1365 endif
1366
1367 # Hacky but MSI support *must* be enabled
1368 ifdef VBOX_WITH_MSI_DEVICES
1369 VBoxEhciR3_DEFS += VBOX_WITH_MSI_DEVICES
1370 VBoxEhciR0_DEFS += VBOX_WITH_MSI_DEVICES
1371 VBoxEhciRC_DEFS += VBOX_WITH_MSI_DEVICES
1372 endif
1373
1374 endif
1375
1376 if defined(VBOX_WITH_PCI_PASSTHROUGH)
1377 DLLS += VBoxPciRawR3
1378 VBoxPciRawR3_TEMPLATE = VBoxR3ExtPackPuel
1379 VBoxPciRawR3_SOURCES = Bus/DevPciRaw.cpp
1380 VBoxPciRawR3_SOURCES.win = build/VBoxPciRawR3.rc
1381
1382 DLLS += VBoxPciRawDrv
1383 VBoxPciRawDrv_TEMPLATE = VBoxR3ExtPackPuel
1384 VBoxPciRawDrv_SOURCES = Bus/DrvPciRaw.cpp
1385 VBoxPciRawDrv_SOURCES.win = build/VBoxPciRawDrv.rc
1386
1387 SYSMODS += VBoxPciRawR0
1388 VBoxPciRawR0_TEMPLATE = VBoxR0ExtPackPuel
1389 VBoxPciRawR0_SOURCES = Bus/DevPciRaw.cpp
1390
1391 Bus/DevPciRaw.cpp_INCS = Bus
1392 endif
1393
1394
1395 #
1396 # The Intel PXE ROM.
1397 #
1398 INSTALLS += VBoxExtPackPuelInsRoms
1399 VBoxExtPackPuelInsRoms_TEMPLATE = VBoxInsExtPackPuel
1400 VBoxExtPackPuelInsRoms_SOURCES = PC/PXE/PXE-Intel.rom=>PXE-Intel.rom
1401endif # VBOX_WITH_EXTPACK_PUEL
1402
1403
1404if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1405 #
1406 # Template used for VBoxSVGA3D. (Stips away compiler options.)
1407 #
1408 TEMPLATE_VBoxSVGA3D := VBoxSVGA3D
1409 TEMPLATE_VBoxSVGA3D_EXTENDS := $(if-expr "$(KBUILD_TARGET)" == "darwin",VBoxR3DllOsX107,VBOXR3)
1410 TEMPLATE_VBoxSVGA3D_CFLAGS = $(filter-out -pedantic -Wstrict-prototypes,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CFLAGS))
1411 TEMPLATE_VBoxSVGA3D_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_CXXFLAGS))
1412 TEMPLATE_VBoxSVGA3D_OBJCFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCFLAGS))
1413 TEMPLATE_VBoxSVGA3D_OBJCXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_$(TEMPLATE_VBoxSVGA3D_EXTENDS)_OBJCXXFLAGS))
1414 TEMPLATE_VBoxSVGA3D_LDFLAGS.darwin = $(TEMPLATE_VBoxR3DllOsX107_LDFLAGS.darwin) \
1415 -framework AppKit -framework OpenGL -framework IOKit
1416
1417 #
1418 # The shader library used by the SVGA3D implementation.
1419 #
1420 DLLS += VBoxSVGA3D
1421 VBoxSVGA3D_TEMPLATE = VBoxSVGA3D
1422 VBoxSVGA3D_SDKS = ReorderCompilerIncs
1423 VBoxSVGA3D_DEFS = \
1424 __WINESRC__ \
1425 WINE_UNICODE_API="" \
1426 _REENTRANT \
1427 WINE_NOWINSOCK \
1428 VBOX_WITH_VMSVGA \
1429 VBOX_WITH_VMSVGA3D \
1430 DLLDIR=\"\" \
1431 BINDIR=\"\" \
1432 LIB_TO_BINDIR=\"\" \
1433 LIB_TO_DLLDIR=\"\" \
1434 BIN_TO_DLLDIR=\"\" \
1435 LIB_TO_DATADIR=\"\" \
1436 BIN_TO_DATADIR=\"\" \
1437 _USE_MATH_DEFINES \
1438 VBOX_USING_WINDDK_W7_OR_LATER \
1439 VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT \
1440 IN_vmsvgashader_STATIC \
1441 IN_VMSVGA3D \
1442 VBOX_WINE_WITH_IPRT
1443 if "$(KBUILD_TYPE)" != "debug" || defined(VBOX_WINE_NO_DEBUG_MSGS)
1444 VBoxSVGA3D_DEFS += WINE_NO_DEBUG_MSGS
1445 endif
1446 VBoxSVGA3D_DEFS.x86 += __i386__
1447 VBoxSVGA3D_DEFS.amd64 += __x86_64__
1448 VBoxSVGA3D_DEFS.win += \
1449 USE_WIN32_OPENGL \
1450 VBOX_WINE_WITHOUT_LIBWINE
1451 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DUAL_OPENGL_PROFILE
1452 if 0 # Use the OpenGL 3.2 Core profile (VBoxSVGA3D_DEFS.darwin).
1453 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=3.2 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=2.1
1454 else
1455 VBoxSVGA3D_DEFS.darwin += VBOX_VMSVGA3D_DEFAULT_OGL_PROFILE=2.1 VBOX_VMSVGA3D_OTHER_OGL_PROFILE=3.2
1456 endif
1457
1458 # WINE relies on a gcc 4.4 feature but we have 4.2 on Darwin
1459 VBoxSVGA3D_DEFS.darwin += \
1460 __builtin_ms_va_list=va_list \
1461 __stdcall= \
1462 ms_abi=
1463 VBoxSVGA3D_INCS.win := \
1464 Graphics/shaderlib/libWineStub/include
1465 VBoxSVGA3D_INCS.linux := \
1466 Graphics/shaderlib/wine/include
1467 VBoxSVGA3D_INCS.darwin := \
1468 Graphics/ \
1469 Graphics/shaderlib/wine/include
1470 VBoxSVGA3D_SOURCES := \
1471 Graphics/shaderlib/glsl_shader.c \
1472 Graphics/shaderlib/shader.c \
1473 Graphics/shaderlib/shader_sm1.c \
1474 Graphics/shaderlib/shader_sm4.c \
1475 Graphics/shaderlib/shaderapi.c \
1476 Graphics/shaderlib/utils.c \
1477 Graphics/shaderlib/stateblock.c \
1478 Graphics/shaderlib/directx.c \
1479 Graphics/shaderlib/libWineStub/debug.c
1480 VBoxSVGA3D_SOURCES.win := \
1481 Graphics/VBoxSVGA3D.rc
1482 VBoxSVGA3D_LIBS = $(LIB_RUNTIME)
1483 VBoxSVGA3D_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib
1484 if1of ($(KBUILD_TARGET), solaris linux freebsd)
1485 VBoxSVGA3D_LIBS += GL
1486 endif
1487 VBoxSVGA3D_LDFLAGS.darwin += \
1488 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3D.dylib
1489
1490 #
1491 # The Objective C code needs to be separate since the shaderlib redefines most
1492 # GL functions as pointers, making it impossible to mix with code calling OpenGL
1493 # functions directly. This module must be compiled for 10.7 or later, thus it
1494 # needs to be separate from VBoxDD.dylib, or at least that's our belief...
1495 #
1496 DLLS.darwin += VBoxSVGA3DObjC
1497 VBoxSVGA3DObjC_TEMPLATE = VBoxSVGA3D
1498 VBoxSVGA3DObjC_DEFS = $(VBoxSVGA3D_DEFS)
1499 VBoxSVGA3DObjC_DEFS.x86 = __i386__
1500 VBoxSVGA3DObjC_DEFS.amd64 = __x86_64__
1501 VBoxSVGA3DObjC_DEFS.darwin = $(VBoxSVGA3D_DEFS.darwin)
1502 VBoxSVGA3DObjC_INCS = $(VBoxSVGA3D_INCS)
1503 VBoxSVGA3DObjC_INCS.darwin = $(VBoxSVGA3D_INCS.darwin)
1504 VBoxSVGA3DObjC_LIBS = $(LIB_RUNTIME)
1505 VBoxSVGA3DObjC_LDFLAGS.darwin = \
1506 -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxSVGA3DObjC.dylib \
1507 -framework OpenGL
1508 if 0
1509 VBoxSVGA3DObjC_SOURCES.darwin += \
1510 Graphics/DevVGA-SVGA3d-cocoa.m
1511 else
1512 VBoxSVGA3DObjC_SOURCES.darwin += \
1513 ../HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m \
1514 ../HostServices/SharedOpenGL/OpenGLTest/OpenGLTestDarwin.cpp
1515 endif
1516
1517
1518
1519endif # defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_EXTPACKS)
1520
1521include $(FILE_KBUILD_SUB_FOOTER)
1522
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