Makefile.kmk revision 8d43244aa3d322f7807a4b0488f1038dd2595dc1
# $Id$
## @file
# Sub-Makefile for VBoxManage (the cli frontend).
#
#
# Copyright (C) 2006-2007 Sun Microsystems, Inc.
#
# 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
PROGRAMS += VBoxManage
ifdef VBOX_ONLY_DOCS
VBoxManage_TEMPLATE = VBOXR3NPEXE
VBoxManage_DEFS += VBOX_ONLY_DOCS
VBoxManage_SOURCES = \
VBoxManage.cpp \
VBoxManageHelp.cpp
VBoxManage_LIBS += $(LIB_RUNTIME)
else # !VBOX_ONLY_DOCS
VBoxManage_TEMPLATE = VBOXMAINCLIENTEXE
VBoxManage_DEFS += \
$(if $(VBOX_WITH_VBOXSDL), VBOX_WITH_VBOXSDL) \
$(if $(VBOX_WITH_VRDP), VBOX_WITH_VRDP) \
$(if $(VBOX_WITH_HEADLESS), VBOX_WITH_HEADLESS) \
$(if $(VBOX_WITH_ALSA), VBOX_WITH_ALSA) \
$(if $(VBOX_WITH_SOLARIS_OSS), VBOX_WITH_SOLARIS_OSS) \
$(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
$(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
$(if $(VBOX_WITH_AHCI), VBOX_WITH_AHCI) \
$(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
$(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \
$(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API)
VBoxManage_DEFS.win = _WIN32_WINNT=0x0500
ifdef VBOX_DYNAMIC_NET_ATTACH
VBoxManage_DEFS += VBOX_DYNAMIC_NET_ATTACH
endif
ifdef VBOX_WITH_NETFLT
VBoxManage_DEFS += VBOX_WITH_NETFLT
endif
ifdef VBOX_WITH_VIDEOHWACCEL
VBoxManage_DEFS += VBOX_WITH_VIDEOHWACCEL
endif
VBoxManage_SOURCES = \
VBoxManage.cpp \
VBoxManageHelp.cpp \
VBoxManageModifyVM.cpp \
VBoxManageInfo.cpp \
VBoxManageImport.cpp \
VBoxManageMetrics.cpp \
VBoxManageList.cpp \
VBoxManageDisk.cpp \
VBoxManageSnapshot.cpp \
VBoxManageUSB.cpp \
VBoxInternalManage.cpp \
VBoxManageHostonly.cpp \
VBoxManageDHCPServer.cpp \
$(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp)
endif # !VBOX_ONLY_DOCS
ifneq ($(KBUILD_TARGET),win)
# Workaround for buggy gcc-4.3 compilers, see
#
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36474
#
# Some later revisions of version 4.3.1 are known to work so we assume
# that version 4.3.2 or later has this bug definitely fixed.
VBoxManage_CXXFLAGS.release += \
$(if $(VBOX_GCC_VERSION_CXX),$(if-expr $(VBOX_GCC_VERSION_CXX) < 40300 || $(VBOX_GCC_VERSION_CXX) > 40301,,--param max-fields-for-field-sensitive=0),)
endif
ifndef VBOX_ONLY_DOCS
VBoxManage_LIBS += $(LIB_DDU)
endif # !VBOX_ONLY_DOCS
include $(KBUILD_PATH)/subfooter.kmk