VirtualBox

source: vbox/trunk/src/VBox/Additions/Makefile.kmk@ 4056

Last change on this file since 4056 was 3937, checked in by vboxsync, 18 years ago

added SVN revisions number to the volume title of our guest additions iso image

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.8 KB
Line 
1# $Id: Makefile.kmk 3937 2007-07-31 11:33:43Z vboxsync $
2## @file
3# Top-level makefile for the VirtualBox Guest Additions.
4#
5# This makefile and all it's sub-makefiles are involved in remote
6# building of additions that cannot be build locally. Typically
7# tools/env.sh kmk -C src/VBox/Additions build-somehost-additions
8# is send as a command and the source tree is accessed using an
9# SMB mount.
10#
11# When doing these operations BUILD_TARGET remains the same (not
12# yet true for linux), and it's therefore important that
13# Config.kmk and all the involved (sub-)makefiles doesn't make
14# assumptions about BUILD_TARGET being the same as the additions
15# target.
16#
17# To setup the remote building of an addition target, let's call it
18# XYZ, you need to add VBOX_REMOTE_XYZ_ADDITIONS_BUILD to your
19# LocalConfig.kmk. The value is the command(s) required to execute
20# the equivalent to you locally executing kmk -C src/VBoxAdditions
21# build_xyz_additions. This means BUILD_TARGET* and BUILD_TYPE needs
22# to be specified.
23#
24
25#
26# Copyright (C) 2006-2007 innotek GmbH
27#
28# This file is part of VirtualBox Open Source Edition (OSE), as
29# available from http://www.virtualbox.org. This file is free software;
30# you can redistribute it and/or modify it under the terms of the GNU
31# General Public License as published by the Free Software Foundation,
32# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
33# distribution. VirtualBox OSE is distributed in the hope that it will
34# be useful, but WITHOUT ANY WARRANTY of any kind.
35#
36# If you received this file as part of a commercial VirtualBox
37# distribution, then only the terms of your commercial VirtualBox
38# license agreement apply instead of the previous paragraph.
39#
40
41DEPTH = ../../..
42include $(PATH_KBUILD)/subheader.kmk
43
44#
45# Make some indicator adjustments to keep things simple in these makefiles.
46#
47ifdef VBOX_ADDITIONS_LINUX_ONLY
48 VBOX_ADDITIONS_XYZ_ONLY = 1
49 VBOX_WITH_LINUX_ADDITIONS = 1
50 VBOX_REMOTE_LINUX_ADDITIONS_BUILD =
51 VBOX_WITH_WIN32_ADDITIONS =
52else ifdef VBOX_ADDITIONS_WIN32_ONLY
53 VBOX_ADDITIONS_XYZ_ONLY = 1
54 VBOX_WITH_WIN32_ADDITIONS = 1
55 VBOX_REMOTE_WIN32_ADDITIONS_BUILD =
56 VBOX_WITH_LINUX_ADDITIONS =
57endif
58
59# Include sub-makefiles.
60include $(PATH_SUB_CURRENT)/common/Makefile.kmk
61ifdef VBOX_WITH_WIN32_ADDITIONS
62 ifndef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
63 include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
64 endif
65endif
66
67ifdef VBOX_WITH_LINUX_ADDITIONS
68 SUBDIRS += linux
69 LINUXINSTALLER = $(PATH_BIN)/additions/VBoxLinuxAdditions.run
70endif
71LINUXINSTALLER_CROSS = $(PATH_ROOT)/out/linux.x86/$(BUILD_TYPE)/bin/additions/VBoxLinuxAdditions.run
72ifdef VBOX_ADDITIONS_LINUX_CROSS
73 OTHER_CLEAN += $(LINUXINSTALLER_CROSS)
74 LINUXINSTALLER = $(LINUXINSTALLER_CROSS)
75endif
76
77# The packing target rule, but only if we're on the local build box.
78ifndef VBOX_ADDITIONS_XYZ_ONLY
79 ifneq ($(VBOX_WITH_WIN32_ADDITIONS)$(VBOX_WITH_LINUX_ADDITIONS),)
80 PACKING += $(if $(VBOX_OSE),,$(PATH_BIN)/additions/VBoxGuestAdditions.iso)
81 endif
82endif
83
84include $(PATH_KBUILD)/subfooter.kmk
85
86
87ifdef VBOX_WITH_WIN32_ADDITIONS
88GUESTADDITIONS_WIN32_DEPS = $(PATH_BIN)/additions/VBoxGuest.sys \
89 ./WINNT/VBoxGuest/VBoxGuest.inf \
90 $(PATH_BIN)/additions/VBoxService.exe \
91 $(PATH_BIN)/additions/VBoxHook.dll \
92 $(PATH_BIN)/additions/VBoxControl.exe \
93 $(PATH_BIN)/additions/VBCoInst.dll \
94 $(PATH_BIN)/additions/VBoxMouse.sys \
95 ./WINNT/MouseFilter/VBoxMouse.inf \
96 $(PATH_BIN)/additions/VBoxVideo.sys \
97 ./WINNT/Graphics/Miniport/VBoxVideo.inf \
98 $(PATH_BIN)/additions/VBoxDisp.dll \
99 $(PATH_BIN)/additions/VBoxGINA.dll \
100 $(PATH_BIN)/additions/VBoxGuestAdditions.exe \
101 ./WINNT/Installer/AUTORUN.INF \
102 ./WINNT/Network/AMD/netamd.inf \
103 ./WINNT/Network/AMD/pcntpci5.cat \
104 ./WINNT/Network/AMD/PCNTPCI5.sys
105
106ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
107GUESTADDITIONS_WIN32_DEPS += \
108 $(PATH_BIN)/additions/VBoxMRXNP.dll \
109 $(PATH_BIN)/additions/VBoxSF.sys
110endif
111
112GUESTADDITIONS_WIN32_FILESPEC = \
113 driver/VBoxGuest/VBoxGuest.sys=$(PATH_BIN)/additions/VBoxGuest.sys \
114 driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
115 driver/VBoxGuest/VBoxService.exe=$(PATH_BIN)/additions/VBoxService.exe \
116 driver/VBoxGuest/VBoxHook.dll=$(PATH_BIN)/additions/VBoxHook.dll \
117 driver/VBoxGuest/VBoxControl.exe=$(PATH_BIN)/additions/VBoxControl.exe \
118 driver/VBoxGuest/VBCoInst.dll=$(PATH_BIN)/additions/VBCoInst.dll \
119 driver/VBoxGuest/VBoxMouse.sys=$(PATH_BIN)/additions/VBoxMouse.sys \
120 driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
121 driver/VBoxVideo/VBoxVideo.sys=$(PATH_BIN)/additions/VBoxVideo.sys \
122 driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
123 driver/VBoxVideo/VBoxDisp.dll=$(PATH_BIN)/additions/VBoxDisp.dll \
124 driver/VBoxSF/VBoxSF.sys=$(PATH_BIN)/additions/VBoxSF.sys \
125 driver/VBoxSF/VBoxMRXNP.dll=$(PATH_BIN)/additions/VBoxMRXNP.dll \
126 gina/VBoxGINA.dll=$(PATH_BIN)/additions/VBoxGINA.dll \
127 AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
128 AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
129 AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
130 VBoxGuestAdditions.exe=$(PATH_BIN)/additions/VBoxGuestAdditions.exe \
131 AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
132endif
133
134ifdef LINUXINSTALLER
135GUESTADDITIONS_LINUX_DEPS = $(LINUXINSTALLER)
136GUESTADDITIONS_LINUX_FILESPEC = VBoxLinuxAdditions.run=$(LINUXINSTALLER)
137endif
138
139#
140# Build the Guest Additions ISO image.
141#
142$(PATH_BIN)/additions/VBoxGuestAdditions.iso: \
143 $(GUESTADDITIONS_WIN32_DEPS) $(GUESTADDITIONS_LINUX_DEPS) $(VBOX_SVN_REV_KMK) \
144 Makefile.kmk
145 $(call MSG_TOOL,mkisofs,,$@)
146 $(QUIET)$(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
147 $(GUESTADDITIONS_WIN32_FILESPEC) $(GUESTADDITIONS_LINUX_FILESPEC)
148
149#
150# Remote building.
151#
152ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
153OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions
154$(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions
155$(PATH_TARGET)/ts-remote-build-win32-additions:
156 $(RM) -f $@
157 $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD)
158 $(APPEND) $@
159
160endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
161
162build-win32-additions:
163ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
164 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
165endif
166 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing
167
168
169# build the Linux installer on a remote machine
170$(LINUXINSTALLER_CROSS):
171 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"
172 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"
173 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"
174
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette