Makefile.kmk revision 743b6bc7c21cf4ae071e4a11688afb9cda624f72
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# $Id$
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync## @file
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# Makefile for the Cross Platform Guest Additions Driver.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#
67ee25dd0b63a61dc35a35d0aade75ca6cd06350vboxsync# Copyright (C) 2007 innotek GmbH
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# available from http://www.virtualbox.org. This file is free software;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# you can redistribute it and/or modify it under the terms of the GNU
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# General Public License (GPL) as published by the Free Software
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsyncDEPTH ?= ../../../../..
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsyncSUB_DEPTH = ../..
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsyncinclude $(PATH_KBUILD)/subheader.kmk
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync# PORTME: OSes using mixed case driver names join OS/2, the others join Solaris below.
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync
1ce069685b24d243eb0464f46d4c56b250c64445vboxsyncif1of ($(BUILD_TARGET),os2)
a55af63ead2dcca370bfc0dfe49771d9dcc61b93vboxsync #
e0778e583cb4a0bdc9bcc48f5957e00a01108388vboxsync # VBoxGuest - The Guest Additions Driver (mixed case).
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync #
a55af63ead2dcca370bfc0dfe49771d9dcc61b93vboxsync ifdef VBOX_WITH_OS2_ADDITIONS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync SYSMODS.os2 += VBoxGuest
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync LIBRARIES += VBoxGuestLibOs2Hack
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync endif
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest_TEMPLATE = VBOXGUESTR0
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest_DEFS = VBGL_VBOXGUEST VBOX_HGCM
824ae3158a8b8f8233fec3f5a12c81f139933698vboxsync VBoxGuest_INCS := $(PATH_SUB_CURRENT)
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync ifneq ($(BUILD_TARGET),os2)
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest_SOURCES = \
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest-$(BUILD_TARGET).cpp \
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest.cpp
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest_LIBS = \
824ae3158a8b8f8233fec3f5a12c81f139933698vboxsync $(VBOX_LIB_VBGL_R0BASE) \
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync $(VBOX_LIB_IPRT_GUEST_R0)
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync else # OS/2:
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync # The library order is crusial, so a bit of trickery is necessary.
3a8aa22ef125135ef67bfc396771bcee15ef02dfvboxsync # A library is used to make sure that VBoxGuestA-os2.asm is first in the link. (temporary hack?)
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest_SOURCES = \
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuestA-os2.asm \
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync VBoxGuest-os2.def
b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0vboxsync #VBoxGuest_LDFLAGS = -s -t -v
824ae3158a8b8f8233fec3f5a12c81f139933698vboxsync VBoxGuest_LIBS = \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(TARGET_VBoxGuestLibOs2Hack) \
229a63857c5fd2e441a62206eacce4156d0b2a26vboxsync $(VBOX_LIB_VBGL_R0BASE) \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(VBOX_LIB_IPRT_GUEST_R0) \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(VBOX_GCC_LIBGCC) \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync end
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync ## When debugging init with kDrvTest:
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync #VBoxGuest_NAME = VBoxGst
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuestLibOs2Hack_TEMPLATE = VBOXGUESTR0LIB
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuestLibOs2Hack_NOINST = 1
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuestLibOs2Hack_DEFS = $(VBoxGuest_DEFS)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuestLibOs2Hack_INCS := \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(PATH_SUB_CURRENT) \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(PATH_TARGET) \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(PATH_ROOT)/src/VBox/Runtime/include # for the os2ddk
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuestLibOs2Hack_SOURCES = \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuest-os2.cpp \
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync VBoxGuest.cpp
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync endif # OS/2
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsyncelse if1of ($(BUILD_TARGET),solaris)
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsync #
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync # vboxguest - The Guest Additions Driver (lower cased).
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync #
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync ## @todo rename to vboxguest, please.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync SYSMODS.solaris += vboxadd
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync vboxadd_TEMPLATE = VBOXGUESTR0
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync vboxadd_DEFS = VBGL_VBOXGUEST VBOX_HGCM
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync vboxadd_INCS := $(PATH_SUB_CURRENT)
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync vboxadd_INCS.solaris = $(PATH_ROOT)/src/VBox/Runtime/r0drv/solaris
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync vboxadd_SOURCES = \
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync VBoxGuest-$(BUILD_TARGET).c \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync VBoxGuest.cpp
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync vboxadd_LIBS = \
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync $(VBOX_LIB_VBGL_R0BASE) \
229a63857c5fd2e441a62206eacce4156d0b2a26vboxsync $(VBOX_LIB_IPRT_GUEST_R0)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsyncendif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
a0644dbbd30adb9bd2937110d6f016e56c4cc52bvboxsyncinclude $(PATH_KBUILD)/subfooter.kmk
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
a2d9f81753c129b5e3bbe3769627dcd25a3724bdvboxsync