# $Id: Makefile.kmk 2981 2007-06-01 16:01:28Z vboxsync $ ## @file # Top-level makefile for the VirtualBox Guest Additions. # # This makefile and all it's sub-makefiles are involved in remote # building of additions that cannot be build locally. Typically # tools/env.sh kmk -C src/VBox/Additions build-somehost-additions # is send as a command and the source tree is accessed using an # SMB mount. # # When doing these operations BUILD_TARGET remains the same (not # yet true for linux), and it's therefore important that # Config.kmk and all the involved (sub-)makefiles doesn't make # assumptions about BUILD_TARGET being the same as the additions # target. # # To setup the remote building of an addition target, let's call it # XYZ, you need to add VBOX_REMOTE_XYZ_ADDITIONS_BUILD to your # LocalConfig.kmk. The value is the command(s) required to execute # the equivalent to you locally executing kmk -C src/VBoxAdditions # build_xyz_additions. This means BUILD_TARGET* and BUILD_TYPE needs # to be specified. # # # Copyright (C) 2006-2007 innotek GmbH # # 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 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. # # If you received this file as part of a commercial VirtualBox # distribution, then only the terms of your commercial VirtualBox # license agreement apply instead of the previous paragraph. # DEPTH = ../../.. include $(PATH_KBUILD)/subheader.kmk # # Make some indicator adjustments to keep things simple in these makefiles. # ifdef VBOX_ADDITIONS_LINUX_ONLY VBOX_ADDITIONS_XYZ_ONLY = 1 VBOX_WITH_LINUX_ADDITIONS = 1 VBOX_REMOTE_LINUX_ADDITIONS_BUILD = VBOX_WITH_WIN32_ADDITIONS = else ifdef VBOX_ADDITIONS_WIN32_ONLY VBOX_ADDITIONS_XYZ_ONLY = 1 VBOX_WITH_WIN32_ADDITIONS = 1 VBOX_REMOTE_WIN32_ADDITIONS_BUILD = VBOX_WITH_LINUX_ADDITIONS = endif # Include sub-makefiles. include $(PATH_SUB_CURRENT)/common/Makefile.kmk ifdef VBOX_WITH_WIN32_ADDITIONS ifndef VBOX_REMOTE_WIN32_ADDITIONS_BUILD include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk endif endif ifdef VBOX_WITH_LINUX_ADDITIONS SUBDIRS += linux LINUXINSTALLER = $(PATH_BIN)/additions/VBoxLinuxAdditions.run endif LINUXINSTALLER_CROSS = $(PATH_ROOT)/out/linux.x86/$(BUILD_TYPE)/bin/additions/VBoxLinuxAdditions.run ifdef VBOX_ADDITIONS_LINUX_CROSS OTHER_CLEAN += $(LINUXINSTALLER_CROSS) LINUXINSTALLER = $(LINUXINSTALLER_CROSS) endif # The packing target rule, but only if we're on the local build box. ifndef VBOX_ADDITIONS_XYZ_ONLY ifneq ($(VBOX_WITH_WIN32_ADDITIONS)$(VBOX_WITH_LINUX_ADDITIONS),) PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso endif endif include $(PATH_KBUILD)/subfooter.kmk ifdef VBOX_WITH_WIN32_ADDITIONS GUESTADDITIONS_WIN32_DEPS = $(PATH_BIN)/additions/VBoxGuest.sys \ ./WINNT/VBoxGuest/VBoxGuest.inf \ $(PATH_BIN)/additions/VBoxService.exe \ $(PATH_BIN)/additions/VBoxControl.exe \ $(PATH_BIN)/additions/VBCoInst.dll \ $(PATH_BIN)/additions/VBoxMouse.sys \ ./WINNT/MouseFilter/VBoxMouse.inf \ $(PATH_BIN)/additions/VBoxVideo.sys \ ./WINNT/Graphics/Miniport/VBoxVideo.inf \ $(PATH_BIN)/additions/VBoxDisp.dll \ $(PATH_BIN)/additions/VBoxGINA.dll \ $(PATH_BIN)/additions/VBoxGuestAdditions.exe \ ./WINNT/Installer/AUTORUN.INF \ ./WINNT/Network/AMD/netamd.inf \ ./WINNT/Network/AMD/pcntpci5.cat \ ./WINNT/Network/AMD/PCNTPCI5.sys GUESTADDITIONS_WIN32_FILESPEC = \ driver/VBoxGuest/VBoxGuest.sys=$(PATH_BIN)/additions/VBoxGuest.sys \ driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \ driver/VBoxGuest/VBoxService.exe=$(PATH_BIN)/additions/VBoxService.exe \ driver/VBoxGuest/VBoxControl.exe=$(PATH_BIN)/additions/VBoxControl.exe \ driver/VBoxGuest/VBCoInst.dll=$(PATH_BIN)/additions/VBCoInst.dll \ driver/VBoxGuest/VBoxMouse.sys=$(PATH_BIN)/additions/VBoxMouse.sys \ driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \ driver/VBoxVideo/VBoxVideo.sys=$(PATH_BIN)/additions/VBoxVideo.sys \ driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \ driver/VBoxVideo/VBoxDisp.dll=$(PATH_BIN)/additions/VBoxDisp.dll \ gina/VBoxGINA.dll=$(PATH_BIN)/additions/VBoxGINA.dll \ AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \ AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \ AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \ VBoxGuestAdditions.exe=$(PATH_BIN)/additions/VBoxGuestAdditions.exe \ AUTORUN.INF=./WINNT/Installer/AUTORUN.INF endif ifdef LINUXINSTALLER GUESTADDITIONS_LINUX_DEPS = $(LINUXINSTALLER) GUESTADDITIONS_LINUX_FILESPEC = VBoxLinuxAdditions.run=$(LINUXINSTALLER) endif # # Build the Guest Additions ISO image. # $(PATH_BIN)/additions/VBoxGuestAdditions.iso: \ $(GUESTADDITIONS_WIN32_DEPS) $(GUESTADDITIONS_LINUX_DEPS) \ Makefile.kmk $(call MSG_TOOL,mkisofs,,$@) $(QUIET)$(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 -volid "VBOXADDITIONS" -l -graft-points -o $@ \ $(GUESTADDITIONS_WIN32_FILESPEC) $(GUESTADDITIONS_LINUX_FILESPEC) # # Remote building. # ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions $(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions $(PATH_TARGET)/ts-remote-build-win32-additions: $(RM) -f $@ $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD) $(APPEND) $@ endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS build-win32-additions: ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it. $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime endif $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing # build the Linux installer on a remote machine $(LINUXINSTALLER_CROSS): ssh vbox@$(VBOX_ADDITIONS_LINUX_CROSS_HOST) "./enter-rhel3-jail /mnt/tinderwin_vbox/w32-rel/tools/env.sh --no-wine kmk -C src/VBox/Runtime BUILD_TYPE=release VBOX_ADDITIONS_LINUX_ONLY=1" ssh vbox@$(VBOX_ADDITIONS_LINUX_CROSS_HOST) "./enter-rhel3-jail /mnt/tinderwin_vbox/w32-rel/tools/env.sh --no-wine kmk -C src/VBox/Additions/common BUILD_TYPE=release VBOX_ADDITIONS_LINUX_ONLY=1" ssh vbox@$(VBOX_ADDITIONS_LINUX_CROSS_HOST) "./enter-rhel3-jail /mnt/tinderwin_vbox/w32-rel/tools/env.sh --no-wine kmk -C src/VBox/Additions/linux BUILD_TYPE=release all packing"