Makefile.kmk revision c0273d7aeb66f65cd4b13e6f30c0101686d66f96
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Makefile for the Linux installer.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# available from http://www.virtualbox.org. This file is free software;
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# you can redistribute it and/or modify it under the terms of the GNU
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# General Public License (GPL) as published by the Free Software
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# additional information or have any questions.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncDEPTH = ../../../..
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncinclude $(KBUILD_PATH)/header.kmk
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncifneq ($(KBUILD_HOST),linux)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync$(error "The Linux installer can only be built on Linux!") # yeah, right.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncVBOX_NO_LINUX_RUN_INSTALLER ?= $(VBOX_OSE)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncPACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncPACKING = $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(PATH_BIN)/$(PACKAGE_NAME) $(PATH_BIN)/VirtualBox-dbg.tar.bz2)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncPACKING += $(PATH_BIN)/VirtualBox.tar.bz2
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncOTHER_CLEAN = $(addprefix $(PATH_TARGET)/install/,\
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(wildcard $(PATH_TARGET)/VirtualBox-*) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(PATH_TARGET)/vboxdrv.sh $(PATH_TARGET)/vboxnet.sh
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncINSTALLS = linux-bin linux-doc
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Linux installs.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-bin_INST = bin/
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-bin_MODE = a+rx,u+w
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-bin_SOURCES = \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-doc_INST = bin/
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-doc_MODE = a+r,u+w
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsynclinux-doc_SOURCES = \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt=>LICENSE) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Strip these binaries
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINUXSTRIPBIN = \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_WITH_FFMPEG),VBoxFFmpegFB.so,) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync VBoxManage \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync VBoxXPCOMIPCD \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync VBoxTunctl \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Do not remove relocation information of these binaries
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINUXSTRIPOBJ = \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncifeq ($(KBUILD_TARGET_ARCH),amd64)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINUXSTRIPOBJ += \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync# Do not strip anything of these files
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsyncLINUXNOSTRIP = \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_OSE),,LICENSE) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_WITH_QT4GUI),\
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync $(if $(VBOX_OSE),,License-$(VBOX_LICENSE_VER).html)) \
VBox.sh \
VBox.png \
$(if $(VBOX_WITH_QT4GUI),VirtualBox.desktop,) \
$(PATH_ROOT)/src/VBox/Frontends/VirtualBox4/nls/ApprovedLanguages.txt),\
$(if $(VBOX_OSE),,additions/VBoxGuestAdditions.iso)
$(if $(VBOX_OSE),,VRDPAuth.so)
$(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so,)
$(if $(VBOX_WITH_INFO_SVC),VBoxSharedInfoSvc.so)
ifneq ($(wildcard $(PATH_BIN)/VirtualBox.chm),)
# our 64-bit tinderboxes are not able to generate VirtualBox.chm so far
ifneq ($(wildcard $(PATH_BIN)/VirtualBoxAPI.chm),)
# same applies to VirtualBoxAPI.chm
DBGPATH := usr/lib/debug/opt/VirtualBox-$(VBOX_VERSION_STRING)
include $(KBUILD_PATH)/footer.kmk
$(PATH_TARGET)/install/VirtualBox.tar.bz2 \
$(PATH_TARGET)/vboxnet.sh \
$(PATH_TARGET)/vboxdrv.sh \
$(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt)
$(QUIET)chmod 0744 $(PATH_TARGET)/install/install.sh
$(QUIET)$(INSTALL) -m 0755 routines.sh $(PATH_TARGET)/install
$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_ROOT)/doc/License.txt $(PATH_TARGET)/install/LICENSE)
$(QUIET)$(INSTALL) -m 0755 $(PATH_TARGET)/vboxnet.sh $(PATH_TARGET)/install
$(QUIET)$(INSTALL) -m 0755 $(PATH_TARGET)/vboxdrv.sh $(PATH_TARGET)/install
$(PATH_BIN)/VirtualBox-dbg.tar.bz2: \
# .tar.bz2 for converting into .run
$(PATH_TARGET)/install/VirtualBox.tar.bz2: \
$(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING) $(LINUXARCHFILES)
# .tar.bz2 for distribution
$(PATH_BIN)/VirtualBox.tar.bz2: \
$(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox-$(VBOX_VERSION_STRING)+" $< > $@
$(QUIET)$(if $(VBOX_NO_LINUX_RUN_INSTALLER),,objcopy --add-gnu-debuglink=$(subst $(PATH_TARGET)/archive,$(PATH_TARGET)/archive-dbg/$(DBGPATH),$@) $@)