Makefile.kmk revision 91afe8a45492af90be74e8b56d46c8659f827b0b
9e20026ee2defa33ee5175d93139414793419181David Luna# $Id$
9e20026ee2defa33ee5175d93139414793419181David Luna## @file
9e20026ee2defa33ee5175d93139414793419181David Luna# Sub-Makefile for the common guest addition code library.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# Copyright (C) 2006-2007 Sun Microsystems, Inc.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# This file is part of VirtualBox Open Source Edition (OSE), as
9e20026ee2defa33ee5175d93139414793419181David Luna# available from http://www.virtualbox.org. This file is free software;
9e20026ee2defa33ee5175d93139414793419181David Luna# you can redistribute it and/or modify it under the terms of the GNU
9e20026ee2defa33ee5175d93139414793419181David Luna# General Public License (GPL) as published by the Free Software
9e20026ee2defa33ee5175d93139414793419181David Luna# Foundation, in version 2 as it comes in the "COPYING" file of the
9e20026ee2defa33ee5175d93139414793419181David Luna# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9e20026ee2defa33ee5175d93139414793419181David Luna# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
9e20026ee2defa33ee5175d93139414793419181David Luna# Clara, CA 95054 USA or visit http://www.sun.com if you need
9e20026ee2defa33ee5175d93139414793419181David Luna# additional information or have any questions.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David LunaSUB_DEPTH = ../../../../..
9e20026ee2defa33ee5175d93139414793419181David Lunainclude $(KBUILD_PATH)/subheader.kmk
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# Target config.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David LunaLIBRARIES += \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR0Lib \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR0LibBase
9e20026ee2defa33ee5175d93139414793419181David LunaLIBRARIES += \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3Lib \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibShared
9e20026ee2defa33ee5175d93139414793419181David Lunaif1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
9e20026ee2defa33ee5175d93139414793419181David Luna LIBRARIES += \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibXFree86
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczekendif
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Lunaifndef VBOX_WITH_ADDITION_DRIVERS
9e20026ee2defa33ee5175d93139414793419181David Luna if1of ($(KBUILD_TARGET), linux l4) # All drivers are optional, can skip RuntimeGuestR0.
9e20026ee2defa33ee5175d93139414793419181David Luna LIBRARIES := $(filter-out VBoxGuestR0Lib VBoxGuestR0LibBase, $(LIBRARIES))
9e20026ee2defa33ee5175d93139414793419181David Luna endif
9e20026ee2defa33ee5175d93139414793419181David Lunaendif
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczek# VBoxGuestR0Lib
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0Lib_TEMPLATE = VBOXGUESTR0LIB
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0Lib_DEFS = VBOX_WITH_HGCM
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0Lib_INCS = \
9e20026ee2defa33ee5175d93139414793419181David Luna $(PATH_VBoxGuestR0Lib)
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0Lib_SOURCES = \
9e20026ee2defa33ee5175d93139414793419181David Luna GenericRequest.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna SysHlp.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna PhysHeap.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna Init.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VMMDev.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna HGCM.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxCalls.c
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczek# VBoxGuestR0LibBase
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0LibBase_TEMPLATE = VBOXGUESTR0LIB
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0LibBase_DEFS = VBOX_WITH_HGCM VBGL_VBOXGUEST
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0LibBase_INCS = $(VBoxGuestR0Lib_INCS)
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0LibBase_INCS.win = $(VBoxGuestR0Lib_INCS.win)
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR0LibBase_SOURCES = \
9e20026ee2defa33ee5175d93139414793419181David Luna GenericRequest.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna SysHlp.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna PhysHeap.cpp \
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczek Init.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VMMDev.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna HGCMInternal.cpp
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# VBoxGuestR3Lib
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3Lib_TEMPLATE = VBOXGUESTR3LIB
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3Lib_DEFS = \
9e20026ee2defa33ee5175d93139414793419181David Luna VBOX_WITH_HGCM \
9e20026ee2defa33ee5175d93139414793419181David Luna $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,)
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3Lib_SOURCES = \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3Lib.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibClipboard.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibDaemonize.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibGR.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.cpp,) \
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczek VBoxGuestR3LibMouse.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibMisc.cpp \
0f6eeb82fd2dec036bfb136b103ee7ec1a292622David Luna VBoxGuestR3LibSeamless.cpp \
0f6eeb82fd2dec036bfb136b103ee7ec1a292622David Luna VBoxGuestR3LibTime.cpp \
0f6eeb82fd2dec036bfb136b103ee7ec1a292622David Luna VBoxGuestR3LibVideo.cpp
9e20026ee2defa33ee5175d93139414793419181David Lunaifeq ($(KBUILD_TARGET),win) ## @todo get rid of this hack (as soon as it's all implemented / #defined).
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3Lib_SOURCES = \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3Lib.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibGR.cpp \
9e20026ee2defa33ee5175d93139414793419181David Luna $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.cpp,) \
9e20026ee2defa33ee5175d93139414793419181David Luna VBoxGuestR3LibMisc.cpp
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan Hemzaczekendif
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3LibShared_TEMPLATE = VBOXGUESTR3DLL
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3LibShared_DEFS := $(VBoxGuestR3Lib_DEFS)
3d8ee1629200b24b539b887a7feaec640fe610a8Kajetan HemzaczekVBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
9e20026ee2defa33ee5175d93139414793419181David LunaVBoxGuestR3LibShared_INST := $(INST_ADDITIONS_LIB)
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna
9e20026ee2defa33ee5175d93139414793419181David Luna#
9e20026ee2defa33ee5175d93139414793419181David Luna# VBoxGuestR3LibXFree86 - a reduced version of the guest library which uses
9e20026ee2defa33ee5175d93139414793419181David Luna# the X server runtime instead of IPRT, for use with old servers where the
9e20026ee2defa33ee5175d93139414793419181David Luna# C library is not available.
#
VBoxGuestR3LibXFree86_TEMPLATE = VBOXGUESTR3LIB
VBoxGuestR3LibXFree86_DEFS = \
VBOX_WITH_HGCM VBOX_VBGLR3_XFREE86 \
$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,)
VBoxGuestR3LibXFree86_SOURCES = \
VBoxGuestR3Lib.cpp \
VBoxGuestR3LibGR.cpp \
$(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.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
include $(KBUILD_PATH)/subfooter.kmk