Makefile.kmk revision 7ca03104e62719b76fff2472718a3a6ca7d6d050
5b281ba489ca18f0380d7efc7a5108b606cce449vboxsync# Top-level makefile for the devices, drivers and services.
c7814cf6e1240a519cbec0441e033d0e2470ed00vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# available from http://www.virtualbox.org. This file is free software;
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# additional information or have any questions.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncSUB_DEPTH = ../../..
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# temporary, we will remove this in some days
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBOX_WITH_BSD_REASS = 1
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBOX_WITH_BSD_TCP_REASS = 1
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBOX_PATH_DEVICES_SRC := $(PATH_SUB_CURRENT)
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# Include sub-makefiles.
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncinclude $(PATH_SUB_CURRENT)/PC/BIOS/Makefile.kmk
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifdef VBOX_WITH_VMI
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync include $(PATH_SUB_CURRENT)/PC/VMI/Makefile.kmk
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncinclude $(PATH_SUB_CURRENT)/Graphics/BIOS/Makefile.kmk
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncinclude $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncinclude $(PATH_SUB_CURRENT)/Storage/testcase/Makefile.kmk
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncifndef VBOX_OSE
282f5fe327c5d622addc8b943407a35d8b192a19vboxsync include $(PATH_SUB_CURRENT)/Storage/VBoxHDDFormats/Makefile.kmk
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsyncifdef VBOX_WITH_INTEL_PXE
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsync include $(PATH_SUB_CURRENT)/PC/PXE/Makefile.kmk
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsync # Subdir with complex makefile.
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsync SUBDIRS_LIBRARIES += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsync SUBDIRS_CLEAN += $(VBOX_PATH_DEVICES_SRC)/PC/Etherboot-src
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsync # Disable the unsafe pass order optimizations.
282f5fe327c5d622addc8b943407a35d8b192a19vboxsync KBUILD_SAFE_PARALLEL = 1
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync# Main targets.
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncLIBRARIES += DevicesR3 Drivers ServicesR0
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifdef VBOX_USE_NAT
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncLIBRARIES += NatAlias
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncDLLS += VBoxDDU VBoxDD VBoxDD2
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncSYSMODS += VBoxDDGC VBoxDD2GC VBoxDDR0 VBoxDD2R0
282f5fe327c5d622addc8b943407a35d8b192a19vboxsync# VBoxDDU (shared object)
6162a4a3d82747a7d0a3a2b2633a67a945cb5002vboxsyncVBoxDDU_TEMPLATE = VBOXR3
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncVBoxDDU_NAME = $(basename $(notdir $(LIB_DDU)))
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncVBoxDDU_DEFS = IN_VBOXDDU
282f5fe327c5d622addc8b943407a35d8b192a19vboxsyncifdef VBOX_WITH_USB
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_DEFS += VBOX_WITH_USB IN_USBLIB
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_SDKS.win = WINPSDK W2K3DDK
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync ifdef VBOX_WITH_EHCI
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_DEFS += VBOX_WITH_EHCI
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBoxDDU_SOURCES = \
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifdef VBOX_WITH_USB
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBoxDDU_LIBS = \
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync $(LIB_RUNTIME)
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifdef VBOX_WITH_USB
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_LIBS += \
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifeq ($(KBUILD_TARGET),l4)
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_LIBS += \
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncifdef VBOX_WITH_USB
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsync VBoxDDU_LDFLAGS.darwin += -framework IOKit
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBoxDDU_LDFLAGS.linux = -Wl,--no-undefined
1319c68f8bf1c1195c93ecf9acccf19354d91ba8vboxsyncVBoxDDU_LDFLAGS.l4 = -Wl,--no-undefined
VBoxDD_SDKS.win = WINPSDK DXSDK W2K3DDK VBOX_NTDLL
$(PATH_LIB)/VBoxDD2.lib \
$(PATH_SDK_DXSDK_LIB)/dxguid.lib
$(L4_LIBDIR)/libl4sys.p.a
VBoxDD_LIBS.darwin += \
VBoxDD_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD_LDFLAGS.l4 = -Wl,--no-undefined
$(L4_LIBDIR)/libl4sys.p.a
VBoxDD2_LIBS.darwin += $(LIB_REM)
VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined
VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined
DevicesR3_SDKS.win = WINPSDK W2K3DDK
DevicesR3_DEFS.linux += _GNU_SOURCE
DevicesR3_DEFS.l4 += _GNU_SOURCE
PC/DevACPI.cpp_INCS = $(PATH_DevicesR3)
Bus/DevPCI.cpp_INCS = Bus
Graphics/DevVGA.cpp_INCS = $(PATH_VgaBiosBin)
Drivers_SDKS.win = WINPSDK W2K3DDK
Storage/DrvHostDVD.cpp_SDKS.win = W2K3DDK
Drivers_DEFS.win += _WIN32_WINNT=0x0510
Drivers_SOURCES += Network/DrvNAT.cpp
Network/DrvNAT.cpp_DEFS += VBOX_NAT_SOURCES
Network/nat/src/sys/net/if_clone.c_CFLAGS.linux += -std=c99
Drivers_SOURCES += Network/nat/nat_socket.c
NatAlias_CFLAGS += -include Network/nat/bsd.h
NatAlias_DEFS += IN_NAT # used in Network/nat/nat.h (which glues VBox and *BSD sources)
NatAlias_DEFS.linux += _GNU_SOURCE
NatAlias_SOURCES += Network/nat/nat_utils.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_nat.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in_cksum.c
NatAlias_SOURCES += Network/nat/src/sys/net/if.c
NatAlias_SOURCES += Network/nat/src/sys/net/if_clone.c
NatAlias_SOURCES += Network/nat/src/sys/net/bpf.c
NatAlias_SOURCES += Network/nat/src/sys/net/if_loop.c
NatAlias_SOURCES += Network/nat/src/sys/net/if_ef.c
NatAlias_SOURCES += Network/nat/src/sys/net/if_ethersubr.c
NatAlias_SOURCES += Network/nat/src/sys/net/route.c
NatAlias_SOURCES += Network/nat/src/sys/net/pfil.c
NatAlias_SOURCES += Network/nat/src/sys/net/netisr.c
NatAlias_SOURCES += Network/nat/src/sys/net/radix.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_options.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timewait.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_timer.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/if_ether.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in_pcb.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in_proto.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in_rmx.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/in_mcast.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_icmp.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fastfwd.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_output.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_input.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_mroute.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_id.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_divert.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/raw_ip.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_syncache.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_sack.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_subr.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_input.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_output.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_reass.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_hostcache.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/tcp_usrreq.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/udp_usrreq.c
NatAlias_SOURCES += Network/nat/src/sys/kern/subr_eventhandler.c
NatAlias_SOURCES += Network/nat/src/sys/kern/kern_mbuf.c
NatAlias_SOURCES += Network/nat/src/sys/kern/kern_subr.c
NatAlias_SOURCES += Network/nat/src/sys/kern/kern_resource.c
NatAlias_SOURCES += Network/nat/src/sys/kern/kern_time.c
NatAlias_SOURCES += Network/nat/src/sys/kern/kern_clock.c
#NatAlias_SOURCES += Network/nat/src/sys/kern/kern_timeout.c
NatAlias_SOURCES += Network/nat/src/sys/kern/subr_sbuf.c
NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf.c
NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_mbuf2.c
NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_sockbuf.c
NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_socket.c
NatAlias_SOURCES += Network/nat/src/sys/kern/uipc_domain.c
NatAlias_SOURCES += Network/nat/src/sys/vm/uma_core.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw2.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/ip_fw_pfil.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias.c
#NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_cuseeme.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_db.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_dummy.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_ftp.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_irc.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_mod.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_nbt.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_pptp.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_proxy.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_skinny.c
#NatAlias_SOURCES += Network/nat/src/sys/libalias/alias_smedia.c
NatAlias_SOURCES += Network/nat/src/sys/netinet/libalias/alias_util.c
NatAlias_INCS += Network/nat
NatAlias_INCS += Network/nat/src/sys
NatAlias_INCS += Network/nat/src/sys/contrib/altq
$(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
Drivers_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
Drivers_DEFS.linux += VBOX_WITH_ALSA
# VBoxDD_LIBS.linux += asound
Drivers_DEFS.linux += VBOX_WITH_PULSE
# VBoxDD_LIBS.linux += pulse
Drivers_DEFS.darwin += VUSB_HAVE_USBPROXY_DEVICE
Drivers_DEFS.darwin += VBOX_WITH_NEW_USB_CODE_ON_DARWIN
Drivers_DEFS.linux += VUSB_HAVE_USBPROXY_DEVICE
Drivers_DEFS.linux += VBOX_WITHOUT_LINUX_COMPILER_H
Drivers_DEFS.l4 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.l4 += \
Drivers_DEFS.os2 += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.os2 += \
Drivers_DEFS.win += VUSB_HAVE_USBPROXY_DEVICE
Drivers_SOURCES.win += \
Drivers_DEFS.solaris += VUSB_HAVE_USBPROXY_DEVICE
# Ring-0 Services (library, linked into VMMR0.r0)
ServicesR0_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
include $(KBUILD_PATH)/subfooter.kmk