VirtualBox

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

Last change on this file since 211 was 26, checked in by vboxsync, 18 years ago

Use the VBOX_NTDLL SDK for including ntdll.lib or we'll pickup CRT symbols from it breaking w2k and other things.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.2 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_DevicesR3)/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 Network/ne2000.c \
149 Audio/DevIchAc97.cpp \
150 PC/dma.c \
151 Storage/fdc.c \
152 Serial/serial.c
153
154ifdef VBOX_WITH_USB
155DevicesR3_DEFS += VBOX_WITH_USB IN_USB_R3
156DevicesR3_SOURCES += \
157 USB/DevOHCI.cpp
158endif
159
160DevicesR3_DEFS += VBOX_HGCM
161DevicesR3_DEFS.linux += _GNU_SOURCE
162DevicesR3_DEFS.l4 += _GNU_SOURCE
163
164
165# DevACPI.cpp needs vboxaml.hex which we generate from PC/vbox.dsl.
166PC/DevACPI.cpp_DEPS = $(PATH_TARGET)/vboxaml.hex
167PC/DevACPI.cpp_INCS = $(PATH_TARGET)
168Bus/DevPCI.cpp_INCS = Bus
169
170
171#
172# VBoxDDGC
173#
174VBoxDDGC_TEMPLATE = VBOXGC
175VBoxDDGC_DEFS =
176VBoxDDGC_SYSSUFF = .gc
177VBoxDDGC_INCS = \
178 $(PATH_CURRENT)
179VBoxDDGC_SOURCES = \
180 muldiv64.c \
181 Bus/DevPCI.cpp \
182 Graphics/DevVGA.cpp \
183 Input/pckbd.c \
184 PC/DevACPI.cpp \
185 PC/DevPit-i8254.cpp \
186 PC/DevPIC.cpp \
187 PC/DevRTC.cpp \
188 Storage/DevATA.cpp \
189 Network/DevPCNet.cpp
190
191ifdef VBOX_WITH_USB
192VBoxDDGC_DEFS += VBOX_WITH_USB IN_USB_GC
193VBoxDDGC_SOURCES += \
194 USB/DevOHCI.cpp
195endif
196
197ifeq ($(VBOX_LDR_FMT32),pe)
198VBoxDDGC_LDFLAGS = -Entry:vgaMMIOWrite
199endif
200ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
201VBoxDDGC_LIBS = \
202 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
203 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
204endif
205
206
207#
208# VBoxDDR0
209#
210VBoxDDR0_TEMPLATE = VBOXR0
211VBoxDDR0_SYSSUFF = .r0
212VBoxDDR0_DEFS = IN_RT_R0
213VBoxDDR0_INCS = \
214 $(PATH_CURRENT)
215VBoxDDR0_SOURCES = \
216 muldiv64.c \
217 Bus/DevPCI.cpp \
218 Graphics/DevVGA.cpp \
219 Input/pckbd.c \
220 PC/DevACPI.cpp \
221 PC/DevPit-i8254.cpp \
222 PC/DevPIC.cpp \
223 PC/DevRTC.cpp \
224 Storage/DevATA.cpp \
225 Network/DevPCNet.cpp
226
227ifdef VBOX_WITH_USB
228VBoxDDR0_DEFS += VBOX_WITH_USB IN_USB_R0
229VBoxDDR0_SOURCES += \
230 USB/DevOHCI.cpp
231endif
232
233ifeq ($(VBOX_LDR_FMT32),pe)
234VBoxDDR0_LDFLAGS = -Entry:vgaMMIOWrite
235endif
236ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
237VBoxDDR0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
238endif
239VBoxDDR0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
240ifeq ($(VBOX_LDR_FMT32),elf) # this is template stuff!
241VBoxDDR0_LIBS += $(VBOX_GCC_LIBGCC)
242endif
243
244
245#
246# VBoxDD2GC (LGPL code)
247#
248VBoxDD2GC_TEMPLATE = VBOXGC
249VBoxDD2GC_DEFS =
250VBoxDD2GC_SYSSUFF = .gc
251VBoxDD2GC_INCS = \
252 $(PATH_CURRENT)
253VBoxDD2GC_SOURCES = \
254 PC/apic.c
255ifeq ($(VBOX_LDR_FMT32),pe)
256VBoxDD2GC_LDFLAGS = -Entry:apicMMIOWrite
257endif
258ifneq ($(filter pe lx,$(VBOX_LDR_FMT32)),)
259VBoxDD2GC_LIBS = \
260 $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB) \
261 $(PATH_LIB)/VMMGCImp$(VBOX_SUFF_LIB)
262endif
263
264
265#
266# VBoxDD2R0 (LGPL code)
267#
268VBoxDD2R0_TEMPLATE = VBOXR0
269VBoxDD2R0_DEFS = IN_RT_R0
270VBoxDD2R0_SYSSUFF = .r0
271VBoxDD2R0_INCS = \
272 $(PATH_CURRENT)
273VBoxDD2R0_SOURCES = \
274 PC/apic.c
275ifeq ($(VBOX_LDR_FMT),pe)
276VBoxDD2R0_LDFLAGS = -Entry:apicMMIOWrite
277endif
278ifneq ($(filter pe lx,$(VBOX_LDR_FMT)),)
279VBoxDD2R0_LIBS = $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB)
280endif
281VBoxDD2R0_LIBS += $(PATH_LIB)/RuntimeR0$(VBOX_SUFF_LIB)
282ifeq ($(VBOX_LDR_FMT),elf)
283VBoxDD2R0_LIBS += $(VBOX_GCC_LIBGCC)
284endif
285
286
287#
288# Drivers (library)
289#
290ifeq ($(BUILD_TARGET),l4) # We are using real Linux headers, not the cleaned up user space ones
291Drivers_TEMPLATE = VBOXR3NP
292else
293Drivers_TEMPLATE = VBOXR3
294endif
295Drivers_SDKS.win = WINPSDK W2K3DDK
296Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
297Drivers_DEFS = IN_IDE_R3
298Drivers_INCS = \
299 Network/slirp
300Drivers_SOURCES = \
301 Input/DrvMouseQueue.cpp \
302 Input/DrvKeyboardQueue.cpp \
303 Storage/VBoxHDD.cpp \
304 Storage/DrvBlock.cpp \
305 Storage/DrvMediaISO.cpp \
306 Storage/DrvRawImage.cpp \
307 Storage/DrvHostBase.cpp \
308 Storage/DrvHostDVD.cpp \
309 Storage/DrvHostFloppy.cpp \
310 PC/DrvACPI.cpp \
311 Network/DrvIntNet.cpp \
312 Network/DrvNetSniffer.cpp \
313 Network/DrvNAT.cpp \
314 Network/slirp/cksum.c \
315 Network/slirp/if.c \
316 Network/slirp/ip_icmp.c \
317 Network/slirp/ip_input.c \
318 Network/slirp/ip_output.c \
319 Network/slirp/slirp.c \
320 Network/slirp/mbuf.c \
321 Network/slirp/misc.c \
322 Network/slirp/sbuf.c \
323 Network/slirp/socket.c \
324 Network/slirp/tcp_input.c \
325 Network/slirp/tcp_output.c \
326 Network/slirp/tcp_subr.c \
327 Network/slirp/tcp_timer.c \
328 Network/slirp/tftp.c \
329 Network/slirp/udp.c \
330 Network/slirp/bootp.c \
331 Network/slirp/debug.c \
332 Audio/audio.c \
333 Audio/mixeng.c \
334 Audio/noaudio.c \
335 Audio/audiosniffer.c
336
337# -- OS specific --
338
339ifeq ($(BUILD_TARGET),darwin)
340Drivers_SOURCES := $(filter-out \
341 Storage/DrvHost% \
342 , $(Drivers_SOURCES))
343Drivers_SOURCES.darwin =
344endif # darwin
345
346
347ifeq ($(BUILD_TARGET),l4)
348Drivers_SOURCES = \
349 Input/DrvMouseQueue.cpp \
350 Input/DrvKeyboardQueue.cpp \
351 Storage/VBoxHDD.cpp \
352 Storage/DrvBlock.cpp \
353 Storage/DrvMediaISO.cpp \
354 Storage/DrvRawImage.cpp \
355 Storage/DrvHostBase.cpp \
356 Storage/DrvHostDVD.cpp \
357 PC/DrvACPI.cpp \
358 Network/DrvIntNet.cpp \
359 Network/DrvNetSniffer.cpp \
360 Audio/audio.c \
361 Audio/mixeng.c \
362 Audio/noaudio.c \
363 Audio/audiosniffer.c
364
365Drivers_SOURCES.l4 = \
366 Network/DrvTAP.cpp \
367 Audio/ossaudio.c
368endif # l4
369
370Drivers_SOURCES.linux = \
371 Network/DrvTAP.cpp \
372 Audio/ossaudio.c
373
374ifeq ($(BUILD_TARGET),os2)
375Drivers_SOURCES := $(filter-out \
376 Storage/DrvHost% \
377 , $(Drivers_SOURCES))
378Drivers_SOURCES.os2 =
379endif
380
381Drivers_SOURCES.win = \
382 Network/DrvTAPWin32.cpp \
383 Audio/dsoundaudio.c
384
385
386# -- features --
387
388ifdef VBOX_WITH_ISCSI
389Drivers_SOURCES += \
390 Storage/DrvISCSI.cpp \
391 Storage/DrvISCSITransportTCP.cpp
392Drivers_DEFS += VBOX_WITH_ISCSI
393endif # VBOX_WITH_ISCSI
394
395ifdef VBOX_WITH_ALSA
396Drivers_DEFS += VBOX_WITH_ALSA
397Drivers_SOURCES.linux += \
398 Audio/alsaaudio.c
399VBoxDD_LIBS.linux += asound
400endif
401
402ifdef VBOX_WITH_USB
403Drivers_DEFS += VBOX_WITH_USB IN_USB_R3
404Drivers_SOURCES += \
405 USB/DrvVUSBRootHub.cpp \
406 USB/VUSBDevice.cpp \
407 USB/VUSBUrb.cpp
408ifdef VBOX_WITH_VRDP
409Drivers_SOURCES += \
410 USB/vrdp/USBProxyDevice-vrdp.cpp
411endif
412
413Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
414Drivers_SOURCES.linux += \
415 USB/USBProxyDevice.cpp \
416 USB/linux/USBProxyDevice-linux.cpp
417
418Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
419Drivers_SOURCES.l4 += \
420 USB/USBProxyDevice.cpp \
421 USB/linux/USBProxyDevice-linux.cpp
422
423Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
424Drivers_SOURCES.win += \
425 USB/USBProxyDevice.cpp \
426 USB/win32/USBProxyDevice-win32.cpp \
427 USB/win32/USBLib-win32.cpp
428endif # VBOX_WITH_USB
429
430
431
432#
433# Ring-0 Services (library, linked into VMMR0.r0)
434#
435ServicesR0_TEMPLATE = VBOXR0
436ServicesR0_DEFS = IN_INTNET_R0 IN_RT_R0
437ServicesR0_SOURCES = \
438 Network/SrvIntNetR0.cpp
439
440#
441# Internal Networking - Ring-3 Testcase for the Ring-0 code (a bit hackish).
442#
443tstIntNetR0_TEMPLATE = VBOXR3TSTEXE
444tstIntNetR0_DEFS = IN_INTNET_R0
445tstIntNetR0_SOURCES = \
446 Network/testcase/tstIntNetR0.cpp
447tstIntNetR0_LIBS = \
448 $(LIB_RUNTIME)
449
450
451include $(PATH_KBUILD)/footer.kmk
452
453
454# ACPI DSL generation
455$(PATH_TARGET)/vboxaml.hex: PC/vbox.dsl
456 $(call MSG_L1,iasl $<,=> $@)
457 $(QUIET)$(VBOX_IASLCMD) -tc -vs -p $@ $<
458
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