VirtualBox

source: vbox/trunk/src/VBox/Devices/Makefile@ 514

Last change on this file since 514 was 240, checked in by vboxsync, 18 years ago

Added first VMDK attempt.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.3 KB
Line 
1#
2# Makefile for the devices, drivers and services.
3#
4
5#
6# Copyright (C) 2006 InnoTek Systemberatung GmbH
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License as published by the Free Software Foundation,
12# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13# distribution. VirtualBox OSE is distributed in the hope that it will
14# be useful, but WITHOUT ANY WARRANTY of any kind.
15#
16# If you received this file as part of a commercial VirtualBox
17# distribution, then only the terms of your commercial VirtualBox
18# license agreement apply instead of the previous paragraph.
19#
20
21DEPTH = ../../..
22include $(PATH_KBUILD)/header.kmk
23
24ifdef VBOX_WITH_TESTCASES
25 PROGRAMS = tstIntNetR0
26endif
27LIBRARIES = DevicesR3 Drivers ServicesR0
28DLLS = VBoxDD VBoxDD2
29SYSMODS = VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
30
31OTHER_CLEAN = \
32 $(PATH_TARGET)/vboxaml.hex \
33 $(PATH_TARGET)/vboxaml.aml
34
35SUBDIRS = \
36 PC/BIOS \
37 PC/Etherboot-src \
38 Graphics/BIOS
39SUBDIRS_AFTER = \
40 Storage/testcase
41
42
43#
44# Check for VBOX_* stuff which governs defines.
45#
46ifdef VBOX_USE_IOAPIC
47DEFS += USE_IOAPIC
48endif
49ifdef VBOX_WITH_VRDP
50DEFS += VBOX_VRDP
51endif
52
53# enable the pdm lock.
54#DEFS += VBOX_WITH_PDM_LOCK
55
56
57#
58# VBoxDD (shared object)
59#
60VBoxDD_TEMPLATE = VBOXR3
61VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
62VBoxDD_SOURCES = \
63 Builtins.cpp \
64 muldiv64.c
65VBoxDD_DEFS = VBOX_ACPI
66ifdef VBOX_WITH_USB
67VBoxDD_DEFS += VBOX_WITH_USB IN_USB_R3
68endif
69ifdef VBOX_WITH_ISCSI
70VBoxDD_DEFS += VBOX_WITH_ISCSI
71endif
72VBoxDD_LIBS = \
73 $(PATH_LIB)/DevicesR3$(VBOX_SUFF_LIB) \
74 $(PATH_LIB)/Drivers$(VBOX_SUFF_LIB) \
75 $(PATH_LIB)/PcDefBiosLogo$(VBOX_SUFF_LIB) \
76 $(LIB_VMM) \
77 $(LIB_RUNTIME)
78VBoxDD_LIBS.win = \
79 $(PATH_LIB)/VBoxDD2.lib \
80 $(PATH_SDK_DXSDK_LIB)/dxguid.lib
81VBoxDD_LIBS.linux = \
82 $(PATH_BIN)/VBoxDD2.so
83
84#
85ifeq ($(BUILD_TARGET),l4)
86VBoxDD_LIBS += \
87 $(L4_LIBDIR)/libl4sys.p.a
88endif
89VBoxDD_LIBS.l4 = \
90 $(PATH_BIN)/VBoxDD2.s.so
91VBoxDD_LIBS.darwin = \
92 $(PATH_BIN)/VBoxDD2.dylib \
93 $(LIB_REM)
94VBoxDD_LIBS.os2 = \
95 $(PATH_BIN)/VBoxDD2.dll
96VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
97VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
98
99
100# damn, fix this.
101$(PATH_LIB)/VBoxDD2.lib: $(PATH_BIN)/VBoxDD2.dll
102
103
104#
105# VBoxDD2 (shared object)
106#
107VBoxDD2_TEMPLATE = VBOXR3
108VBoxDD2_DEFS = IN_VBOXDD2
109VBoxDD2_SOURCES = \
110 Builtins2.cpp \
111 PC/apic.c
112VBoxDD2_LIBS = \
113 $(PATH_LIB)/PcBiosBin$(VBOX_SUFF_LIB) \
114 $(PATH_LIB)/VgaBiosBin$(VBOX_SUFF_LIB) \
115 $(PATH_LIB)/NetBiosBin$(VBOX_SUFF_LIB) \
116 $(LIB_VMM) \
117 $(LIB_RUNTIME)
118VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
119ifeq ($(BUILD_TARGET),l4)
120VBoxDD2_LIBS += \
121 $(L4_LIBDIR)/libl4sys.p.a
122endif
123VBoxDD2_LIBS.darwin += $(LIB_REM)
124VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
125
126
127#
128# DevicesR3 (library)
129#
130DevicesR3_TEMPLATE = VBOXR3
131DevicesR3_SDKS.win = WINPSDK W2K3DDK
132DevicesR3_INCS = \
133 $(PATH_CURRENT)
134DevicesR3_SOURCES = \
135 Input/pckbd.c \
136 Bus/DevPCI.cpp \
137 Graphics/DevVGA.cpp \
138 Storage/DevATA.cpp \
139 PC/DevPit-i8254.cpp \
140 PC/DevPIC.cpp \
141 PC/DevACPI.cpp \
142 PC/DevRTC.cpp \
143 PC/DevPcBios.cpp \
144 PC/DevPcArch.c \
145 VMMDev/VBoxDev.cpp \
146 VMMDev/VMMDevHGCM.cpp \
147 Network/DevPCNet.cpp \
148 Audio/DevIchAc97.cpp \
149 PC/dma.c \
150 Storage/fdc.c \
151 Serial/serial.c
152
153ifeq (0,1)
154DevicesR3_SOURCES += \
155 Network/ne2000.c
156endif
157
158ifdef VBOX_WITH_USB
159DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
160DevicesR3_SOURCES += \
161 USB/DevOHCI.cpp
162endif
163
164DevicesR3_DEFS += VBOX_HGCM
165DevicesR3_DEFS.linux += _GNU_SOURCE
166DevicesR3_DEFS.l4 += _GNU_SOURCE
167
168
169# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
170PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
171PC/DevACPI.cpp_INCS = $(PATH_TARGET)
172Bus/DevPCI.cpp_INCS = Bus
173
174
175#
176# VBoxDDGC
177#
178VBoxDDGC_TEMPLATE = VBOXGC
179VBoxDDGC_DEFS =
180VBoxDDGC_SYSSUFF = .gc
181VBoxDDGC_INCS = \
182 $(PATH_CURRENT)
183VBoxDDGC_SOURCES = \
184 muldiv64.c \
185 Bus/DevPCI.cpp \
186 Graphics/DevVGA.cpp \
187 Input/pckbd.c \
188 PC/DevACPI.cpp \
189 PC/DevPit-i8254.cpp \
190 PC/DevPIC.cpp \
191 PC/DevRTC.cpp \
192 Storage/DevATA.cpp \
193 Network/DevPCNet.cpp
194
195ifdef VBOX_WITH_USB
196VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
197VBoxDDGC_SOURCES += \
198 USB/DevOHCI.cpp
199endif
200
201ifeq ($(VBOX_LDR_FMT32),pe)
202VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
203endif
204ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
205VBoxDDGC_LIBS = \
206 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
207 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
208endif
209
210
211#
212# VBoxDDR0
213#
214VBoxDDR0_TEMPLATE = VBOXR0
215VBoxDDR0_SYSSUFF = .r0
216VBoxDDR0_DEFS = IN_RT_R0
217VBoxDDR0_INCS = \
218 $(PATH_CURRENT)
219VBoxDDR0_SOURCES = \
220 muldiv64.c \
221 Bus/DevPCI.cpp \
222 Graphics/DevVGA.cpp \
223 Input/pckbd.c \
224 PC/DevACPI.cpp \
225 PC/DevPit-i8254.cpp \
226 PC/DevPIC.cpp \
227 PC/DevRTC.cpp \
228 Storage/DevATA.cpp \
229 Network/DevPCNet.cpp
230
231ifdef VBOX_WITH_USB
232VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
233VBoxDDR0_SOURCES += \
234 USB/DevOHCI.cpp
235endif
236
237ifeq ($(VBOX_LDR_FMT32),pe)
238VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
239endif
240ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
241VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
242endif
243VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
244ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
245VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
246endif
247
248
249#
250# VBoxDD2GC (LGPL code)
251#
252VBoxDD2GC_TEMPLATE = VBOXGC
253VBoxDD2GC_DEFS =
254VBoxDD2GC_SYSSUFF = .gc
255VBoxDD2GC_INCS = \
256 $(PATH_CURRENT)
257VBoxDD2GC_SOURCES = \
258 PC/apic.c
259ifeq ($(VBOX_LDR_FMT32),pe)
260VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
261endif
262ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
263VBoxDD2GC_LIBS = \
264 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
265 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
266endif
267
268
269#
270# VBoxDD2R0 (LGPL code)
271#
272VBoxDD2R0_TEMPLATE = VBOXR0
273VBoxDD2R0_DEFS = IN_RT_R0
274VBoxDD2R0_SYSSUFF = .r0
275VBoxDD2R0_INCS = \
276 $(PATH_CURRENT)
277VBoxDD2R0_SOURCES = \
278 PC/apic.c
279ifeq ($(VBOX_LDR_FMT),pe)
280VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
281endif
282ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
283VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
284endif
285VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
286ifeq ($(VBOX_LDR_FMT),elf)
287VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
288endif
289
290
291#
292# Drivers (library)
293#
294ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
295Drivers_TEMPLATE = VBOXR3NP
296else
297Drivers_TEMPLATE = VBOXR3
298endif
299Drivers_SDKS.win = WINPSDK W2K3DDK
300Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
301Drivers_DEFS = IN_IDE_R3
302Drivers_INCS = \
303 Network/slirp
304Drivers_SOURCES = \
305 Input/DrvMouseQueue.cpp \
306 Input/DrvKeyboardQueue.cpp \
307 Storage/VBoxHDD.cpp \
308 Storage/DrvBlock.cpp \
309 Storage/VmdkHDD.cpp \
310 Storage/DrvMediaISO.cpp \
311 Storage/DrvRawImage.cpp \
312 Storage/DrvHostBase.cpp \
313 Storage/DrvHostDVD.cpp \
314 Storage/DrvHostFloppy.cpp \
315 PC/DrvACPI.cpp \
316 Network/DrvIntNet.cpp \
317 Network/DrvNetSniffer.cpp \
318 Network/DrvNAT.cpp \
319 Network/slirp/cksum.c \
320 Network/slirp/if.c \
321 Network/slirp/ip_icmp.c \
322 Network/slirp/ip_input.c \
323 Network/slirp/ip_output.c \
324 Network/slirp/slirp.c \
325 Network/slirp/mbuf.c \
326 Network/slirp/misc.c \
327 Network/slirp/sbuf.c \
328 Network/slirp/socket.c \
329 Network/slirp/tcp_input.c \
330 Network/slirp/tcp_output.c \
331 Network/slirp/tcp_subr.c \
332 Network/slirp/tcp_timer.c \
333 Network/slirp/tftp.c \
334 Network/slirp/udp.c \
335 Network/slirp/bootp.c \
336 Network/slirp/debug.c \
337 Audio/audio.c \
338 Audio/mixeng.c \
339 Audio/noaudio.c \
340 Audio/audiosniffer.c
341
342# -- OS specific --
343
344ifeq ($(BUILD_TARGET),darwin)
345Drivers_SOURCES := $(filter-out \
346 Storage/DrvHost% \
347 , $(Drivers_SOURCES))
348Drivers_SOURCES.darwin =
349endif # darwin
350
351
352ifeq ($(BUILD_TARGET),l4)
353Drivers_SOURCES = \
354 Input/DrvMouseQueue.cpp \
355 Input/DrvKeyboardQueue.cpp \
356 Storage/VBoxHDD.cpp \
357 Storage/DrvBlock.cpp \
358 Storage/VmdkHDD.cpp \
359 Storage/DrvMediaISO.cpp \
360 Storage/DrvRawImage.cpp \
361 Storage/DrvHostBase.cpp \
362 Storage/DrvHostDVD.cpp \
363 PC/DrvACPI.cpp \
364 Network/DrvIntNet.cpp \
365 Network/DrvNetSniffer.cpp \
366 Audio/audio.c \
367 Audio/mixeng.c \
368 Audio/noaudio.c \
369 Audio/audiosniffer.c
370
371Drivers_SOURCES.l4 = \
372 Network/DrvTAP.cpp \
373 Audio/ossaudio.c
374endif # l4
375
376Drivers_SOURCES.linux = \
377 Network/DrvTAP.cpp \
378 Audio/ossaudio.c
379
380ifeq ($(BUILD_TARGET),os2)
381Drivers_SOURCES := $(filter-out \
382 Storage/DrvHost% \
383 , $(Drivers_SOURCES))
384Drivers_SOURCES.os2 =
385endif
386
387Drivers_SOURCES.win = \
388 Network/DrvTAPWin32.cpp \
389 Audio/dsoundaudio.c
390
391
392# -- features --
393
394ifdef VBOX_WITH_ISCSI
395Drivers_SOURCES += \
396 Storage/DrvISCSI.cpp \
397 Storage/DrvISCSITransportTCP.cpp
398Drivers_DEFS += VBOX_WITH_ISCSI
399endif # VBOX_WITH_ISCSI
400
401ifdef VBOX_WITH_ALSA
402Drivers_DEFS += VBOX_WITH_ALSA
403Drivers_SOURCES.linux += \
404 Audio/alsaaudio.c
405VBoxDD_LIBS.linux += asound
406endif
407
408ifdef VBOX_WITH_USB
409Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
410Drivers_SOURCES += \
411 USB/DrvVUSBRootHub.cpp \
412 USB/VUSBDevice.cpp \
413 USB/VUSBUrb.cpp
414ifdef VBOX_WITH_VRDP
415Drivers_SOURCES += \
416 USB/vrdp/USBProxyDevice-vrdp.cpp
417endif
418
419Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
420Drivers_SOURCES.linux += \
421 USB/USBProxyDevice.cpp \
422 USB/linux/USBProxyDevice-linux.cpp
423
424Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
425Drivers_SOURCES.l4 += \
426 USB/USBProxyDevice.cpp \
427 USB/linux/USBProxyDevice-linux.cpp
428
429Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
430Drivers_SOURCES.win += \
431 USB/USBProxyDevice.cpp \
432 USB/win32/USBProxyDevice-win32.cpp \
433 USB/win32/USBLib-win32.cpp
434endif # VBOX_WITH_USB
435
436
437
438#
439# Ring-0 Services (library, linked into VMMR0.r0)
440#
441ServicesR0_TEMPLATE = VBOXR0
442ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
443ServicesR0_SOURCES = \
444 Network/SrvIntNetR0.cpp
445
446#
447# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
448#
449tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
450tstIntNetR0_DEFS = IN_INTNET_R0
451tstIntNetR0_SOURCES = \
452 Network/testcase/tstIntNetR0.cpp
453tstIntNetR0_LIBS = \
454 $(LIB_RUNTIME)
455
456
457include $(PATH_KBUILD)/footer.kmk
458
459
460# ACPI DSL generation
461$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
462 $(call MSG_L1,iasl $<,=> $@)
463 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
464
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