1 | # $Id: Makefile.kmk 3836 2007-07-25 14:28:06Z 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 |
|
---|
41 | DEPTH = ../../..
|
---|
42 | include $(PATH_KBUILD)/subheader.kmk
|
---|
43 |
|
---|
44 | #
|
---|
45 | # Make some indicator adjustments to keep things simple in these makefiles.
|
---|
46 | #
|
---|
47 | ifdef 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 =
|
---|
52 | else 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 =
|
---|
57 | endif
|
---|
58 |
|
---|
59 | # Include sub-makefiles.
|
---|
60 | include $(PATH_SUB_CURRENT)/common/Makefile.kmk
|
---|
61 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
62 | ifndef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
|
---|
63 | include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
|
---|
64 | endif
|
---|
65 | endif
|
---|
66 |
|
---|
67 | ifdef VBOX_WITH_LINUX_ADDITIONS
|
---|
68 | SUBDIRS += linux
|
---|
69 | LINUXINSTALLER = $(PATH_BIN)/additions/VBoxLinuxAdditions.run
|
---|
70 | endif
|
---|
71 | LINUXINSTALLER_CROSS = $(PATH_ROOT)/out/linux.x86/$(BUILD_TYPE)/bin/additions/VBoxLinuxAdditions.run
|
---|
72 | ifdef VBOX_ADDITIONS_LINUX_CROSS
|
---|
73 | OTHER_CLEAN += $(LINUXINSTALLER_CROSS)
|
---|
74 | LINUXINSTALLER = $(LINUXINSTALLER_CROSS)
|
---|
75 | endif
|
---|
76 |
|
---|
77 | # The packing target rule, but only if we're on the local build box.
|
---|
78 | ifndef 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
|
---|
82 | endif
|
---|
83 |
|
---|
84 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
85 |
|
---|
86 |
|
---|
87 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
88 | GUESTADDITIONS_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 |
|
---|
106 | ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
|
---|
107 | GUESTADDITIONS_WIN32_DEPS += \
|
---|
108 | $(PATH_BIN)/additions/VBoxMRXNP.dll \
|
---|
109 | $(PATH_BIN)/additions/VBoxSF.sys
|
---|
110 | endif
|
---|
111 |
|
---|
112 | GUESTADDITIONS_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
|
---|
130 | endif
|
---|
131 |
|
---|
132 | ifdef LINUXINSTALLER
|
---|
133 | GUESTADDITIONS_LINUX_DEPS = $(LINUXINSTALLER)
|
---|
134 | GUESTADDITIONS_LINUX_FILESPEC = VBoxLinuxAdditions.run=$(LINUXINSTALLER)
|
---|
135 | endif
|
---|
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 | #
|
---|
150 | ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
|
---|
151 | OTHER_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 |
|
---|
158 | endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
|
---|
159 |
|
---|
160 | build-win32-additions:
|
---|
161 | ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
|
---|
162 | $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
|
---|
163 | endif
|
---|
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 |
|
---|