Makefile.kmk revision cf22150eaeeb72431bf1cf65c309a431454fb22b
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# $Id$
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync## @file
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Makefile for the FreeBSD installer.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# Copyright (C) 2006-2013 Oracle Corporation
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# available from http://www.virtualbox.org. This file is free software;
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# you can redistribute it and/or modify it under the terms of the GNU
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# General Public License (GPL) as published by the Free Software
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncSUB_DEPTH = ../../../..
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncinclude $(KBUILD_PATH)/subheader.kmk
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifneq ($(KBUILD_HOST),freebsd)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(error "The FreeBSD installer can only be built on FreeBSD!")
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Globals and targets.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_PATH_FBSD_INST_SRC := $(PATH_SUB_CURRENT)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_OUT_DIR := $(PATH_TARGET)/Installer/freebsd
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_STAGE_DIR := $(PATH_TARGET)/Installer/freebsd/install
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_DBG_PATH := usr/lib/debug/opt/VirtualBox
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).tbz
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_LIB_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/lib
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_BIN_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/bin
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_LIBVBOX_DIR := $(VBOX_FBSD_INST_LIB_DIR)/virtualbox
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_SHARE_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/share
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_SHAREAPP_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/applications
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_SHAREICON_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/pixmaps
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_SHAREVBOX_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/virtualbox
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Unset this to speed up things during makefile hacking.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncBLDDIRS += $(VBOX_FBSD_INST_OUT_DIR) $(VBOX_FBSD_INST_STAGE_DIR)
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsyncPACKING += $(PATH_STAGE_BIN)/$(VBOX_FBSD_PACKAGE_NAME)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncOTHER_CLEAN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(addprefix $(VBOX_FBSD_INST_STAGE_DIR)/,\
79e912ed261d7f771015708254b78902023d6bedvboxsync pkg_plist \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync LICENSE) \
79e912ed261d7f771015708254b78902023d6bedvboxsync $(wildcard $(VBOX_FBSD_INST_OUT_DIR)/VirtualBox-*)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# FreeBSD installs.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncINSTALLS += freebsd-misc
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncfreebsd-misc_INST = bin/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncfreebsd-misc_MODE = a+r,u+w
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncfreebsd-misc_SOURCES = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsync $(if $(VBOX_WITH_QTGUI),$(freebsd-misc_0_OUTDIR)/virtualbox.desktop,)
bbc0a3fc49446bf8fa1fcfe669c10875701692bcvboxsyncfreebsd-misc_CLEAN = $(freebsd-misc_0_OUTDIR)/virtualbox.desktop
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$$(PATH_freebsd-misc)/virtualbox.desktop: $(PATH_SUB_CURRENT)/virtualbox.desktop $(VBOX_VERSION_STAMP) | $$(dir $$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_GENERATE,,$@,$<)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_PATH_PACKAGE_DOCS
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" --output $@ $<
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncelse
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox+" --output $@ $<
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# The files residing in bin/ that we'll ship.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Strip these binaries
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_STRIP_BIN = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDD.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDD2.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxREM.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDDU.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxVMM.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxRT.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \
581e3d620a136351616aefc4c9c04b299610ee4cvboxsync $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \
c8cc094f51df8a2b86a8137eaf65c3a9eb39b858vboxsync VBoxHostChannel.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_MAIN), \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxManage \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxNetAdpCtl \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxSVC \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxXPCOM.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxXPCOMC.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxXPCOMIPCD \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync components/VBoxXPCOMIPCC.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync components/VBoxSVCM.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync components/VBoxC.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_CROGL),\
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxOGLhostcrutil.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxOGLhosterrorspu.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxOGLrenderspu.so \
79e912ed261d7f771015708254b78902023d6bedvboxsync VBoxTestOGL \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxSharedCrOpenGL.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_PYTHON),VBoxPython.so,)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Do not remove relocation information of these binaries
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_STRIP_OBJ = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDD2GC.gc \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDD2R0.r0 \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDDGC.gc \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxDDR0.r0 \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VMMGC.gc \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VMMR0.r0
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Do not strip anything of these files
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_NO_STRIP = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_OSE),,LICENSE) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_MAIN), \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync components/VBoxXPCOMBase.xpt \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync components/VirtualBox_XPCOM.xpt) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync vboxdrv.tar.gz
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
7be5810498a9566c95b3662647945cf20084afedvboxsync# EFI firmware
7be5810498a9566c95b3662647945cf20084afedvboxsyncifdef VBOX_WITH_EFIFW_PACKING
7be5810498a9566c95b3662647945cf20084afedvboxsync VBOX_FBSD_NO_STRIP += \
cb1c9aee152f51cd97c07794ca4e0441b2444b0cvboxsync VBoxEFI32.fd \
cb1c9aee152f51cd97c07794ca4e0441b2444b0cvboxsync VBoxEFI64.fd
7be5810498a9566c95b3662647945cf20084afedvboxsyncendif
7be5810498a9566c95b3662647945cf20084afedvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Symlinks residing in bin/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_SYMLINKS = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_MAIN), \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxManage \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxSVC) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Qt4 GUI
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_QTGUI
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxKeyboard.so \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VirtualBox \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_SYMLINKS += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VirtualBox
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_NO_STRIP += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(VBOX_LICENSE_FILES) \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(if $(VBOX_WITH_QT4_SUN),$(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)),) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_QT4_SUN),accessible/libqtaccessiblewidgets.so,) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_DESKTOP_FILE = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync virtualbox.desktop
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_ICON_FILE = \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBox.png
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Guest Additions
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_ADDITIONS_PACKING
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_NO_STRIP += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync additions/VBoxGuestAdditions.iso
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Documentation
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_DOCS_PACKING
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_NO_STRIP += \
b02f38c4dc8e3d755e064c54180ef3ecbbc5aef8vboxsync VirtualBox.chm UserManual.pdf \
b02f38c4dc8e3d755e064c54180ef3ecbbc5aef8vboxsync $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_KCHMVIEWER),kchmviewer,)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# VRDP
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_VRDP
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxVRDP.so \
b8908d384db2324f04a2f68a13e67ea32ebf609avboxsync VBoxAuth.so
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_NO_STRIP += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync rdesktop-vrdp.tar.gz
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync ifdef VBOX_WITH_VRDP_RDESKTOP
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# VBOX_FBSD_NO_STRIP += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# rdesktop-vrdp-keymaps
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync rdesktop-vrdp
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync endif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Headless
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_HEADLESS
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxHeadless \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_SYMLINKS += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBoxHeadless
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Webservices
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifdef VBOX_WITH_WEBSERVICES
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_STRIP_BIN += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync vboxwebsrv \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync webtest
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync VBOX_FBSD_SYMLINKS += \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync vboxwebsrv
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# All the bin files that goes into the archives.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncVBOX_FBSD_ARCH_FILES := $(VBOX_FBSD_STRIP_BIN) $(VBOX_FBSD_STRIP_OBJ) $(VBOX_FBSD_NO_STRIP)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# Cleanup of the files we copy/symlink from bin.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncOTHER_CLEAN += $(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_ARCH_FILES))
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# The module source archive
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync$(PATH_STAGE_BIN)/vboxdrv.tar.gz: \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync src
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_TOOL, export_modules,,$@)
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(QUIET)$(PATH_STAGE_BIN)/export_modules $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# The generic installer.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# @todo r=aeichner: Create pkg_plist dynamically based on the available features
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync#
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync$(PATH_STAGE_BIN)/$(VBOX_FBSD_PACKAGE_NAME): \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(VBOX_VERSION_STAMP) \
79e912ed261d7f771015708254b78902023d6bedvboxsync $(VBOX_FBSD_INST_OUT_DIR)/pkg_plist \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_ARCH_FILES)) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(addprefix $(VBOX_FBSD_INST_BIN_DIR)/,$(VBOX_FBSD_SYMLINKS)) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_QTGUI),$(addprefix $(VBOX_FBSD_INST_SHAREAPP_DIR)/,$(VBOX_FBSD_DESKTOP_FILE)),) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(if $(VBOX_WITH_QTGUI),$(addprefix $(VBOX_FBSD_INST_SHAREICON_DIR)/,$(VBOX_FBSD_ICON_FILE)),) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(VBOX_PATH_FBSD_INST_SRC)/postinstall.sh \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(VBOX_PATH_FBSD_INST_SRC)/postdeinstall.sh
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_TOOL,pkg_create,,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)pkg_create \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -I $(VBOX_PATH_FBSD_INST_SRC)/postinstall.sh \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -K $(VBOX_PATH_FBSD_INST_SRC)/postdeinstall.sh \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -c $(VBOX_PATH_FBSD_INST_SRC)/pkg-comment \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -d $(VBOX_PATH_FBSD_INST_SRC)/pkg-descr \
79e912ed261d7f771015708254b78902023d6bedvboxsync -f $(VBOX_FBSD_INST_OUT_DIR)/pkg_plist \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -p /usr/local \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync -s $(VBOX_FBSD_INST_STAGE_DIR) \
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -Rf $(VBOX_FBSD_INST_STAGE_DIR)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_STRIP_BIN)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_FILE,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# pattern rule for striping and copying the VBOX_FBSD_STRIP_OBJ files to install/lib/virtualbox
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_STRIP_OBJ)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_FILE,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncifeq ($(VBOX_DO_STRIP),)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0644 $< $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncelse # strip to temp file because of umask.
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0644 $@.tmp $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f -- $@.tmp
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsyncendif
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# pattern rule for linking the VBOX_FBSD_NO_STRIP into lib/virtualbox/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_NO_STRIP)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_FILE,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0644 $< $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# pattern rule for symlinking the VBOX_FBSD_SYMLINKS into bin/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_BIN_DIR)/,$(VBOX_FBSD_SYMLINKS)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_BIN_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_SYM,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(LN_SYMLINK) ../lib/virtualbox/$(notdir $@) $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# pattern rule for copying the VBOX_FBSD_DESKTOP_FILE into share/applications/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_SHAREAPP_DIR)/,$(VBOX_FBSD_DESKTOP_FILE)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_SHAREAPP_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_FILE,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0644 $< $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync# pattern rule for copying the VBOX_FBSD_ICON_FILE into share/pixmaps/
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync$(addprefix $(VBOX_FBSD_INST_SHAREICON_DIR)/,$(VBOX_FBSD_ICON_FILE)): \
3b3bc8a9383a065307e540b83fc3a3d6c548a082vboxsync $(VBOX_FBSD_INST_SHAREICON_DIR)/% : $(PATH_STAGE_BIN)/%
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(call MSG_INST_FILE,$<,$@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(RM) -f $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync $(QUIET)$(INSTALL) -m 0644 $< $@
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync
79e912ed261d7f771015708254b78902023d6bedvboxsync# Create pkg_plist
79e912ed261d7f771015708254b78902023d6bedvboxsync$(VBOX_FBSD_INST_OUT_DIR)/pkg_plist: \
79e912ed261d7f771015708254b78902023d6bedvboxsync $(VBOX_PATH_FBSD_INST_SRC)/pkg_plist
79e912ed261d7f771015708254b78902023d6bedvboxsync $(call MSG_INST_FILE,$<,$@)
79e912ed261d7f771015708254b78902023d6bedvboxsync $(QUIET)$(INSTALL) -d $(dir $@)
79e912ed261d7f771015708254b78902023d6bedvboxsync $(QUIET)$(SED) \
79e912ed261d7f771015708254b78902023d6bedvboxsync -e "s;_VBOX_REM_32BIT_MODULE_;$(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM32.so,);g" \
79e912ed261d7f771015708254b78902023d6bedvboxsync -e "s;_VBOX_REM_64BIT_MODULE_;$(if $(eq $(KBUILD_TARGET_ARCH),x86),VBoxREM64.so,);g" \
79e912ed261d7f771015708254b78902023d6bedvboxsync --output $@ \
79e912ed261d7f771015708254b78902023d6bedvboxsync $<
79e912ed261d7f771015708254b78902023d6bedvboxsync
772269936494ffaddd0750ba9e28e805ba81398cvboxsyncinclude $(FILE_KBUILD_SUB_FOOTER)
83ebc9e7aa5a5ee35fa7d0d8f4760549ee52262cvboxsync