# $Id: Makefile.kmk 12446 2008-09-14 23:32:31Z vboxsync $ ## @file # Sub-Makefile for the FreeBSD guest additions base directory. # # # Copyright (C) 2008 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 ifneq ($(KBUILD_HOST),freebsd) $(error "The FreeBSD guest additions installer can only be built on FreeBSD!") endif # Include sub-makefiles. include $(PATH_SUB_CURRENT)/vboxvfs/Makefile.kmk # Globals VBOX_FBSD_ADD_INS_OUT_DIR := $(PATH_TARGET)/Additions/FreeBSD/Installer BLDDIRS += $(VBOX_FBSD_ADD_INS_OUT_DIR) VBOX_FBSD_ADD_PKG_FILENAME := VBoxFreeBSDAdditions.tbz VBOX_FBSD_ADD_PKGINFO_ARCH = $(shell uname -p) VBOX_PATH_FREEBSD_ADDITION_INSTALLER := $(PATH_SUB_CURRENT)/Installer VBOX_PATH_X11_ADDITION_INSTALLER := $(PATH_ROOT)/src/VBox/Additions/x11/installer ifeq ($(KBUILD_TYPE),debug) VBOX_FBSD_ADD_BIN_COPY := $(CP) -f VBOX_FBSD_ADD_BIN_COPY_SYMBOLS := $(CP) -f else VBOX_FBSD_ADD_BIN_COPY := objcopy -S -R .comment VBOX_FBSD_ADD_BIN_COPY_SYMBOLS := objcopy -g -R .comment endif # Targets. PACKING += $(PATH_BIN)/additions/$(VBOX_FBSD_ADD_PKG_FILENAME) OTHER_CLEAN += $(PACKING) include $(KBUILD_PATH)/subfooter.kmk $(PATH_BIN)/additions/VBoxFreeBSDAdditions.tbz: \ $(VBOX_VERSION_STAMP) \ $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/pkg-descr \ $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/vboxguest.sh \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient \ $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl \ $(PATH_BIN)/additions/vboxguest.ko \ $(PATH_BIN)/additions/VBoxClient \ $(PATH_BIN)/additions/VBoxService \ $(PATH_BIN)/additions/VBoxControl \ $(PATH_BIN)/additions/vboxvideo_drv_13.so \ $(PATH_BIN)/additions/vboxvideo_drv_14.so \ $(PATH_BIN)/additions/vboxvideo_drv_70.so \ $(PATH_BIN)/additions/vboxvideo_drv_71.so \ $(PATH_BIN)/additions/vboxmouse_drv_14.so \ $(PATH_BIN)/additions/vboxmouse_drv_70.so \ $(PATH_BIN)/additions/vboxmouse_drv_71.so \ $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk $(call MSG_L1,Installing guest additions) @# Clear out the existing package files if needed $(QUIET)$(RM) -Rf -- $(VBOX_FBSD_ADD_INS_OUT_DIR) $(QUIET)$(MKDIR) -p $(VBOX_FBSD_ADD_INS_OUT_DIR) $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_FREEBSD_ADDITION_INSTALLER)/vboxguest.sh $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxguest.sh $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/98vboxadd-xclient $(VBOX_FBSD_ADD_INS_OUT_DIR)/1099.vboxclient $(QUIET)$(INSTALL) -m 0755 $(VBOX_PATH_X11_ADDITION_INSTALLER)/x11config.pl $(VBOX_FBSD_ADD_INS_OUT_DIR)/x11config.pl $(QUIET)$(CP) -f $(PATH_BIN)/additions/vboxguest.ko $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxguest.ko $(QUIET)$(if $(VBOX_DO_STRIP),strip $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxguest.ko,) $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxClient $(VBOX_FBSD_ADD_INS_OUT_DIR)/VBoxClient $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxService $(VBOX_FBSD_ADD_INS_OUT_DIR)/VBoxService $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/VBoxControl $(VBOX_FBSD_ADD_INS_OUT_DIR)/VBoxControl $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_13.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxvideo_drv_13.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_14.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxvideo_drv_14.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_70.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxvideo_drv_70.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxvideo_drv_71.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxvideo_drv_71.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_14.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxmouse_drv_14.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_70.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxmouse_drv_70.so $(QUIET)$(VBOX_FBSD_ADD_BIN_COPY) $(PATH_BIN)/additions/vboxmouse_drv_71.so $(VBOX_FBSD_ADD_INS_OUT_DIR)/vboxmouse_drv_71.so $(call MSG_L1,Creating install package: $@) $(QUIET)$(VBOX_MAKESELF) $(VBOX_FBSD_ADD_INS_OUT_DIR) $@ \ "VirtualBox $(VBOX_VERSION_STRING) Guest Additions for FreeBSD installation" /bin/sh ./install.sh " 1> /dev/null 2> /dev/null"