VirtualBox

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

Last change on this file since 1048 was 994, checked in by vboxsync, 18 years ago

NO_COMPILER_H -> VBOX_WITHOUT_LINUX_COMPILER_H

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