VirtualBox

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

Last change on this file since 3741 was 3741, checked in by vboxsync, 17 years ago

Added VBoxHook

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.6 KB
Line 
1# $Id: Makefile.kmk 3741 2007-07-20 15:00:00Z 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 += $(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 gina/VBoxGINA.dll=$(PATH_BIN)/additions/VBoxGINA.dll \
125 AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
126 AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
127 AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
128 VBoxGuestAdditions.exe=$(PATH_BIN)/additions/VBoxGuestAdditions.exe \
129 AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
130endif
131
132ifdef LINUXINSTALLER
133GUESTADDITIONS_LINUX_DEPS = $(LINUXINSTALLER)
134GUESTADDITIONS_LINUX_FILESPEC = VBoxLinuxAdditions.run=$(LINUXINSTALLER)
135endif
136
137#
138# Build the Guest Additions ISO image.
139#
140$(PATH_BIN)/additions/VBoxGuestAdditions.iso: \
141 $(GUESTADDITIONS_WIN32_DEPS) $(GUESTADDITIONS_LINUX_DEPS) \
142 Makefile.kmk
143 $(call MSG_TOOL,mkisofs,,$@)
144 $(QUIET)$(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)" -l -graft-points -o $@ \
145 $(GUESTADDITIONS_WIN32_FILESPEC) $(GUESTADDITIONS_LINUX_FILESPEC)
146
147#
148# Remote building.
149#
150ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
151OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions
152$(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions
153$(PATH_TARGET)/ts-remote-build-win32-additions:
154 $(RM) -f $@
155 $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD)
156 $(APPEND) $@
157
158endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
159
160build-win32-additions:
161ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
162 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
163endif
164 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing
165
166
167# build the Linux installer on a remote machine
168$(LINUXINSTALLER_CROSS):
169 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"
170 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"
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/Additions/linux BUILD_TYPE=release all packing"
172
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