Makefile.kmk revision 812d5a3dc25176717512d5e837d224517a7153a6
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# $Id$
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen## @file
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# Sub-Makefile for VBoxBFE (a basic frontend which doesn't make use of Main).
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd#
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# Copyright (C) 2006-2007 Sun Microsystems, Inc.
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# This file is part of VirtualBox Open Source Edition (OSE), as
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# available from http://www.virtualbox.org. This file is free software;
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# you can redistribute it and/or modify it under the terms of the GNU
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# General Public License (GPL) as published by the Free Software
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# Foundation, in version 2 as it comes in the "COPYING" file of the
2e545ce2450a9953665f701bb05350f0d3f26275nd# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# Clara, CA 95054 USA or visit http://www.sun.com if you need
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen# additional information or have any questions.
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenifdef VBOX_KBUILD_HACKING
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenSUB_DEPTH = ../../../..
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenelse
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenDEPTH ?= ../../../..
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cndSUB_DEPTH = ..
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenendif
51b60896224b408a35684bd6ec0fafe5e4abe322rboweninclude $(KBUILD_PATH)/subheader.kmk
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# Targets.
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenifdef VBOX_WITH_HARDENING
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen ifneq ($(KBUILD_TARGET),darwin) # No hardened VBoxBFE on darwin (.m).
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen PROGRAMS += VBoxBFEHardened
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen DLLS += VBoxBFE
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen endif
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenelse
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen PROGRAMS += VBoxBFE
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenendif
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
4aa603e6448b99f9371397d439795c91a93637eand# Hardened VBoxBFE.
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenVBoxBFEHardened_TEMPLATE = VBOXR3HARDENEDEXE
4aa603e6448b99f9371397d439795c91a93637eandVBoxBFEHardened_SOURCES = VBoxBFEHardened.cpp
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenVBoxBFEHardened_NAME = VBoxBFE
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# VBoxBFE
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenVBoxBFE_TEMPLATE =
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenVBoxBFE_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXR3NP,VBOXR3NPEXE)
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#ifdef VBOX_WITH_SECURELABEL
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#VBoxBFE_DEFS += VBOX_SECURELABEL
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen#endif
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenifdef VBOX_WITH_VRDP
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cndVBoxBFE_DEFS += VBOX_VRDP
727872d18412fc021f03969b8641810d8896820bhumbedoohendif
0d0ba3a410038e179b695446bb149cce6264e0abndifneq ($(KBUILD_TARGET).$(VBOX_WITHOUT_COM),win.)
727872d18412fc021f03969b8641810d8896820bhumbedoohVBoxBFE_DEFS += VBOXBFE_WITHOUT_COM
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cndendif
0d0ba3a410038e179b695446bb149cce6264e0abndifdef VBOX_WITHOUT_LINUX_COMPILER_H
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohVBoxBFE_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
727872d18412fc021f03969b8641810d8896820bhumbedoohendif
0d0ba3a410038e179b695446bb149cce6264e0abndVBoxBFE_DEFS.freebsd = VBOXBFE_WITH_X11
0d0ba3a410038e179b695446bb149cce6264e0abndVBoxBFE_DEFS.l4 = _GNU_SOURCE
0d0ba3a410038e179b695446bb149cce6264e0abndVBoxBFE_DEFS.linux = _GNU_SOURCE VBOXBFE_WITH_X11
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedoohVBoxBFE_DEFS.solaris = VBOXBFE_WITH_X11
0d0ba3a410038e179b695446bb149cce6264e0abndifdef VBOX_WITH_CROSSBOW
0d0ba3a410038e179b695446bb149cce6264e0abnd VBoxBFE_DEFS.solaris += VBOX_WITH_CROSSBOW
0d0ba3a410038e179b695446bb149cce6264e0abndendif
727872d18412fc021f03969b8641810d8896820bhumbedoohVBoxBFE_DEFS.win.x86 = _WIN32_WINNT=0x0500
0d0ba3a410038e179b695446bb149cce6264e0abnd
0d0ba3a410038e179b695446bb149cce6264e0abndVBoxBFE_SOURCES = \
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh VBoxBFE.cpp \
205f749042ed530040a4f0080dbcb47ceae8a374rjung VMMDevInterface.cpp \
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen DisplayImpl.cpp \
0d0ba3a410038e179b695446bb149cce6264e0abnd MouseImpl.cpp \
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd KeyboardImpl.cpp \
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd StatusImpl.cpp \
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd MachineDebuggerImpl.cpp \
ea4c99666354f2faaf2926cfd04a3fe6db29bcd3rbowen VMControl.cpp
ifdef VBOX_WITH_HGCM
VBoxBFE_DEFS += VBOX_HGCM
VBoxBFE_SOURCES += \
HGCM.cpp \
HGCMThread.cpp \
HGCMObjects.cpp
endif
VBoxBFE_SOURCES.darwin = \
VBoxBFEMain-darwin.m
VBoxBFE_SOURCES.l4 = \
L4Console.cpp \
L4Framebuffer.cpp \
L4IDLInterface.cpp \
EmulCpp.cpp
# SDL
ifneq ($(KBUILD_TARGET),l4)
VBoxBFE_SDKS += LIBSDL
VBoxBFE_DEFS += USE_SDL
VBoxBFE_SOURCES += \
SDLConsole.cpp \
SDLFramebuffer.cpp
endif
# USB Support
if1of ($(KBUILD_TARGET), l4 win)
VBoxBFE_DEFS += VBOXBFE_WITH_USB
VBoxBFE_SOURCES += \
HostUSBImpl.cpp \
HostUSBDeviceImpl.cpp \
USBProxyService.cpp
VBoxBFE_SOURCES.l4 += \
USBProxyServiceLinux.cpp
VBoxBFE_SOURCES.linux += \
USBProxyServiceLinux.cpp
endif
VBoxBFE_INCS = \
$(PATH_VBoxBFE) \
$(VBOX_PATH_SDK)/include
ifneq ($(filter-out win os2 l4 darwin,$(KBUILD_TARGET)),) # X11
VBoxBFE_INCS += \
$(VBOX_XCURSOR_INCS)
endif
VBoxBFE_INCS.freebsd = \
/usr/include \
/usr/local/include
VBoxBFE_LIBS = \
$(LIB_RUNTIME) \
$(LIB_VMM)
ifneq ($(filter-out win os2 l4,$(KBUILD_TARGET)),)
VBoxBFE_LIBS += \
$(LIB_REM)
endif
ifneq ($(filter-out win os2 l4 darwin,$(KBUILD_TARGET)),) # X11
VBoxBFE_LIBS += \
$(VBOX_XCURSOR_LIBS) \
X11
VBoxBFE_LIBPATH += \
$(VBOX_LIBPATH_X11)
endif
ifndef VBOX_WITHOUT_COM
VBoxBFE_LIBS.win = \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
endif
VBoxBFE_LIBS.l4 = \
$(L4_LIBDIR)/libl4con-idl.a \
$(L4_LIBDIR)/libconstream-server.a \
$(L4_LIBDIR)/libvboxctrl-server.a \
$(L4_LIBDIR)/libl4sys.a
VBoxBFE_LIBS.darwin = \
$(LIB_SDK_LIBSDL_SDLMAIN)
VBoxBFE_LDFLAGS.darwin = -framework Foundation -framework AppKit
VBoxBFE_CXXFLAGS.win = \
-EHsc
VBoxBFE_CXXFLAGS.linux = \
-DNDEBUG -DTRIMMED -O -Wall -fno-rtti -fno-exceptions \
-Wno-non-virtual-dtor -Wno-long-long -fshort-wchar -pthread -pipe
VBoxBFE_CXXFLAGS.l4 += -fno-rtti -nostdinc -Wno-non-virtual-dtor \
$(addprefix -I,$(VBOX_L4_GCC3_INCS) $(L4_INCDIR))
VBoxBFE_CFLAGS.linux += -O ## @todo what's this good for?
VBoxBFE_CLEAN = $(PATH_VBoxBFE)/Ico64x01.h
VBoxBFE_SDLConsole.cpp_DEPS = $(PATH_VBoxBFE)/Ico64x01.h
include $(KBUILD_PATH)/subfooter.kmk
ifdef PATH_VBoxBFE
# Convert the pnm-file to a byte array.
$(PATH_VBoxBFE)/Ico64x01.h: $(PATH_ROOT)/src/VBox/Frontends/VBoxBFE/ico64x01.pnm $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_VBoxBFE))
$(call MSG_TOOL,bin2c,VBoxBFE,$<,$@)
$(QUIET)$(VBOX_BIN2C) Ico64x01 $< $@
endif