VirtualBox

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

Last change on this file since 54030 was 53806, checked in by vboxsync, 10 years ago

added more missing Windows resource files

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