Makefile.kmk revision 743b6bc7c21cf4ae071e4a11688afb9cda624f72
# $Id$
## @file
# Sub-Makefile for the common guest addition code library.
#
#
# Copyright (C) 2006-2007 innotek GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
DEPTH ?= ../../../../..
SUB_DEPTH = ../..
include $(PATH_KBUILD)/subheader.kmk
ifn1of ($(BUILD_TARGET),l4 linux windows)
LIBRARIES += \
VBoxGuestR0Lib \
VBoxGuestR0LibBase
LIBRARIES += \
VBoxGuestR3Lib \
VBoxGuestR3LibShared
if1of ($(BUILD_TARGET),freebsd linux netbsd openbsd)
LIBRARIES += \
VBoxGuestR3LibXFree86
endif
else
# As we build Windows Additions on Linux as well, we need a
# separate Linux target for each library so that both platforms
# are built.
# NOTE: This is going to be obsoleted before long, everyone is going to
# use VBoxGuestR0Lib* and VBoxGuestR3Lib.
ifdef VBOX_WITH_WIN32_ADDITIONS
ifndef VBOX_ADDITIONS_LINUX_ONLY
LIBRARIES += \
VBoxGuestLib \
VBoxGuestLibBase
endif
endif
ifdef VBOX_WITH_LINUX_ADDITIONS
ifdef VBOX_WITH_LINUX_ADDITIONS_32BIT_R0
LIBRARIES += \
VBoxGuestLibLinux \
VBoxGuestLibBaseLinux
endif
LIBRARIES += \
VBoxGuestR3Lib \
VBoxGuestR3LibShared \
VBoxGuestR3LibXFree86 \
VBoxGuestR3LibLinux
endif
endif
#
# VBoxGuestR0Lib
#
VBoxGuestR0Lib_TEMPLATE = VBOXGUESTR0LIB
VBoxGuestR0Lib_DEFS = VBOX_HGCM
VBoxGuestR0Lib_INCS = \
$(PATH_VBoxGuestLib)
VBoxGuestR0Lib_INCS.win = \
$(PATH_SUB_ROOT)/WINNT/SharedFolders/include
VBoxGuestR0Lib_SOURCES = \
GenericRequest.cpp \
SysHlp.cpp \
PhysHeap.cpp \
Init.cpp \
VMMDev.cpp \
HGCM.cpp \
VBoxCalls.c
#
# VBoxGuestR0LibBase
#
VBoxGuestR0LibBase_TEMPLATE = VBOXGUESTR0LIB
VBoxGuestR0LibBase_DEFS = VBOX_HGCM VBGL_VBOXGUEST
VBoxGuestR0LibBase_INCS = $(VBoxGuestR0Lib_INCS)
VBoxGuestR0LibBase_INCS.win = $(VBoxGuestR0Lib_INCS.win)
VBoxGuestR0LibBase_SOURCES = \
GenericRequest.cpp \
SysHlp.cpp \
PhysHeap.cpp \
Init.cpp \
VMMDev.cpp \
HGCMInternal.cpp
#
# VBoxGuestR3Lib
#
VBoxGuestR3Lib_TEMPLATE = VBOXGUESTR3LIB
VBoxGuestR3Lib_DEFS = VBOX_HGCM
VBoxGuestR3Lib_SOURCES = \
VBoxGuestR3Lib.cpp \
VBoxGuestR3LibClipboard.cpp \
VBoxGuestR3LibDaemonize.cpp \
VBoxGuestR3LibGR.cpp \
VBoxGuestR3LibMouse.cpp \
VBoxGuestR3LibMisc.cpp \
VBoxGuestR3LibSeamless.cpp \
VBoxGuestR3LibTime.cpp \
VBoxGuestR3LibVideo.cpp
#
# VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
#
VBoxGuestR3LibShared_TEMPLATE = VBOXGUESTR3DLL
VBoxGuestR3LibShared_DEFS := $(VBoxGuestR3Lib_DEFS)
VBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
VBoxGuestR3LibShared_INST := $(INST_ADDITIONS_LIB)
#
# VBoxGuestR3LibXFree86 - a reduced version of the guest library which uses
# the X server runtime instead of IPRT, for use with old servers where the
# C library is not available.
#
#ifeq ($(BUILD_TARGET),linux) - VBOXGUESTR3LIB should work now (only difference is the default visibility).
#VBoxGuestR3LibXFree86_TEMPLATE = VBOXLNX32GUESTR3LIB
#VBoxGuestR3LibXFree86_INST = $(INST_ADDITIONS_LIB)
#VBoxGuestR3LibXFree86_CXXFLAGS = -fno-exceptions
#else
VBoxGuestR3LibXFree86_TEMPLATE = VBOXGUESTR3LIB
#endif
VBoxGuestR3LibXFree86_DEFS = VBOX_HGCM VBOX_VBGLR3_XFREE86
VBoxGuestR3LibXFree86_SOURCES = \
VBoxGuestR3Lib.cpp \
VBoxGuestR3LibGR.cpp \
VBoxGuestR3LibMouse.cpp \
VBoxGuestR3LibMisc.cpp \
VBoxGuestR3LibVideo.cpp
VBoxGuestR3LibXFree86_INCS = \
$(VBOX_PATH_X11_XFREE_4_2)/programs/Xserver/hw/xfree86/common/ \
$(VBOX_PATH_X11_XFREE_4_2)/programs/Xserver/hw/xfree86/os-support \
$(VBOX_PATH_X11_XFREE_4_2)/programs/Xserver/include \
$(VBOX_PATH_X11_XFREE_4_2)/exports/include/X11
#
# VBoxGuestLib (Windows)
#
VBoxGuestLib_TEMPLATE = VBOXW32GUESTR0LIB
VBoxGuestLib_SDKS.win = W2K3DDKX86 WIN32SDK
VBoxGuestLib_SOURCES = $(VBoxGuestR0Lib_SOURCES)
VBoxGuestLib_INCS = \
$(PATH_VBoxGuestLib)
VBoxGuestLib_INCS.win = \
$(PATH_SUB_ROOT)/WINNT/SharedFolders/include
VBoxGuestLib_DEFS = IN_RING0 IN_RT_R0 VBOX_HGCM LOG_TO_BACKDOOR
#VBoxGuestLib_DEFS += LOG_ENABLED
#
# VBoxGuestLibBase (Windows)
#
VBoxGuestLibBase_TEMPLATE = VBOXW32GUESTR0LIB
VBoxGuestLibBase_SDKS.win = $(VBoxGuestLib_SDKS.win)
VBoxGuestLibBase_SOURCES = $(VBoxGuestR0LibBase_SOURCES)
VBoxGuestLibBase_INCS = $(VBoxGuestLib_INCS)
VBoxGuestLibBase_INCS.win = $(VBoxGuestLib_INCS.win)
VBoxGuestLibBase_DEFS = $(VBoxGuestLib_DEFS) VBGL_VBOXGUEST
VBoxGuestLibBase_DEFS.win = $(VBoxGuestLib_DEFS.win)
#VBoxGuestLibBase_DEFS += LOG_ENABLED
#
# VBoxGuestLibLinux
#
VBoxGuestLibLinux_TEMPLATE = VBOXLNX32GUESTR0
VBoxGuestLibLinux_SOURCES = $(VBoxGuestR0Lib_SOURCES)
VBoxGuestLibLinux_INCS = $(VBoxGuestLib_INCS)
VBoxGuestLibLinux_DEFS = VBOX_HGCM LOG_TO_BACKDOOR
#
# VBoxGuestLibBaseLinux
#
VBoxGuestLibBaseLinux_TEMPLATE = VBOXLNX32GUESTR0
VBoxGuestLibBaseLinux_SOURCES = $(VBoxGuestR0LibBase_SOURCES)
VBoxGuestLibBaseLinux_INCS = $(VBoxGuestLib_INCS)
VBoxGuestLibBaseLinux_DEFS = VBOX_HGCM VBGL_VBOXGUEST LOG_TO_BACKDOOR
#
# VBoxGuestR3LibLinux
#
VBoxGuestR3LibLinux_TEMPLATE = VBOXLNX32GUESTR3LIB
VBoxGuestR3LibLinux_CXXFLAGS = -fno-exceptions
VBoxGuestR3LibLinux_SOURCES = $(VBoxGuestR3Lib_SOURCES)
VBoxGuestR3LibLinux_DEFS = VBOX_HGCM
include $(PATH_KBUILD)/subfooter.kmk