Makefile.kmk revision 686053fed678d3b4b7e3d5186a9b29c7b38260cc
# $Id$
## @file
# Top-level makefile for the VirtualBox Guest Additions.
#
# Cross building of the additions is generally done by remote building
# by means of smbfs, cifs, VBOX_ONLY_ADDITIONS=1 and setting KBUILD_TARGET
# to the desired target.
#
# Limited support for cross building the windows additions using wine
# is provided. There are a couple of issues with the approach (lack of
# signing, no VC++ 8 support, ++) that makes it unsuitable for releases.
#
# Building the linux additions as part of the l4 build is ok because
# l4 is built on a linux platform. This is why we have to check if
# KBUILD_TARGET is l4 or linux in some places, though most of the magic
# is done in the templates (Config.kmk).
#
#
# 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.
#
DEPTH = ../../..
include $(KBUILD_PATH)/subheader.kmk
#
# Note! VBOX_WITH_ADDITIONS is checked for by our parent makefile.
#
# Note! VBOX_WITH_X11_ADDITIONS is set in Config.kmk
#
# Note! The additions build box will set the VBOX_WITH_ADDITIONS_ISO.win.x86
# variables before invoking us from the root makefile.
#
# ==> All we have to worry about is what to do on the target we're on.
#
VBOX_WITH_ADDITIONS_ISO.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
# Include sub-makefiles.
include $(PATH_SUB_CURRENT)/common/Makefile.kmk
ifdef VBOX_WITH_X11_ADDITIONS
include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
endif
ifeq ($(KBUILD_TARGET),freebsd)
include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk
endif
ifeq ($(KBUILD_TARGET),linux)
include $(PATH_SUB_CURRENT)/linux/Makefile.kmk
endif
#ifeq ($(KBUILD_TARGET),os2)
# include $(PATH_SUB_CURRENT)/os2/Makefile.kmk
#endif
ifeq ($(KBUILD_TARGET),solaris)
include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
endif
ifeq ($(KBUILD_TARGET),win)
include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
endif
# The packing target rule, but only if we're on the local build box.
# (VBOX_WITHOUT_ADDITIONS_ISO is used by the additions build box, see the root makefile.)
ifndef VBOX_WITHOUT_ADDITIONS_ISO
PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso
endif
include $(KBUILD_PATH)/subfooter.kmk
#
# File per-OS/arch file specs for the additions iso (alphabetical order).
#
# We test for the VBOX_WITH_ADDITIONS_ISO.os.arch so that we don't have to
# do the $(if )'ing down where the GUESTADDITIONS_FILESPEC.os.arch down
# in the dependency list and mkisofs command.
#
endif
endif
else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
endif
endif
## @todo 64-bit additions: rename this package, update docs (?) and tests (?). create wrapper? create gnome/kde autorun app (xplatform) ?
endif
endif
## @todo 64-bit additions: rename this package, update docs (?) and tests (?).
endif
## @todo 64-bit windows additions:
# It's going to be most of the files from above, except they must not have the same name on
# the iso (left hand side).
# We probably an autorun wrapper which launches the right installer, unless there is
# some Autorun.inf magic for this or that it can be done from the x86 installer.
# Also, we MUST fix the .inf / .cat problem mentioned in the todo above.
endif
## @todo We're missing the .cat files and using the wrong .inf files here! This is kind of serious...
ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
endif
endif # win.x86
#
# Build the Guest Additions ISO image.
#
ifndef VBOX_WITHOUT_ADDITIONS_ISO
$(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
$(filter-out %=deleteme=,\
$(subst =,=deleteme= ,\
)\
) \
$(VBOX_SVN_REV_KMK) \
$(call MSG_TOOL,mkisofs,,$@)
$(QUIET)$(MKDIR) -p $(@D)
@# use iso-level 3 which is the most ISO conforming level with least restrictions; iso-level 4 maps to iso-level 2
@# with some extra restrictions removal (not conforming to ISO9660) which some platforms like Solaris 10 does not like.
$(VBOX_MKISOFS) -rational-rock -joliet -iso-level 3 \
-volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
endif