1 | # $Id: Makefile.kmk 2991 2007-06-01 19:01:02Z 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 += $(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/VBoxControl.exe \
|
---|
92 | $(PATH_BIN)/additions/VBCoInst.dll \
|
---|
93 | $(PATH_BIN)/additions/VBoxMouse.sys \
|
---|
94 | ./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
95 | $(PATH_BIN)/additions/VBoxVideo.sys \
|
---|
96 | ./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
97 | $(PATH_BIN)/additions/VBoxDisp.dll \
|
---|
98 | $(PATH_BIN)/additions/VBoxGINA.dll \
|
---|
99 | $(PATH_BIN)/additions/VBoxGuestAdditions.exe \
|
---|
100 | ./WINNT/Installer/AUTORUN.INF \
|
---|
101 | ./WINNT/Network/AMD/netamd.inf \
|
---|
102 | ./WINNT/Network/AMD/pcntpci5.cat \
|
---|
103 | ./WINNT/Network/AMD/PCNTPCI5.sys
|
---|
104 | GUESTADDITIONS_WIN32_FILESPEC = \
|
---|
105 | driver/VBoxGuest/VBoxGuest.sys=$(PATH_BIN)/additions/VBoxGuest.sys \
|
---|
106 | driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
|
---|
107 | driver/VBoxGuest/VBoxService.exe=$(PATH_BIN)/additions/VBoxService.exe \
|
---|
108 | driver/VBoxGuest/VBoxControl.exe=$(PATH_BIN)/additions/VBoxControl.exe \
|
---|
109 | driver/VBoxGuest/VBCoInst.dll=$(PATH_BIN)/additions/VBCoInst.dll \
|
---|
110 | driver/VBoxGuest/VBoxMouse.sys=$(PATH_BIN)/additions/VBoxMouse.sys \
|
---|
111 | driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
112 | driver/VBoxVideo/VBoxVideo.sys=$(PATH_BIN)/additions/VBoxVideo.sys \
|
---|
113 | driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
114 | driver/VBoxVideo/VBoxDisp.dll=$(PATH_BIN)/additions/VBoxDisp.dll \
|
---|
115 | gina/VBoxGINA.dll=$(PATH_BIN)/additions/VBoxGINA.dll \
|
---|
116 | AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
|
---|
117 | AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
|
---|
118 | AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
|
---|
119 | VBoxGuestAdditions.exe=$(PATH_BIN)/additions/VBoxGuestAdditions.exe \
|
---|
120 | AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
|
---|
121 | endif
|
---|
122 |
|
---|
123 | ifdef LINUXINSTALLER
|
---|
124 | GUESTADDITIONS_LINUX_DEPS = $(LINUXINSTALLER)
|
---|
125 | GUESTADDITIONS_LINUX_FILESPEC = VBoxLinuxAdditions.run=$(LINUXINSTALLER)
|
---|
126 | endif
|
---|
127 |
|
---|
128 | #
|
---|
129 | # Build the Guest Additions ISO image.
|
---|
130 | #
|
---|
131 | $(PATH_BIN)/additions/VBoxGuestAdditions.iso: \
|
---|
132 | $(GUESTADDITIONS_WIN32_DEPS) $(GUESTADDITIONS_LINUX_DEPS) \
|
---|
133 | Makefile.kmk
|
---|
134 | $(call MSG_TOOL,mkisofs,,$@)
|
---|
135 | $(QUIET)$(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)" -l -graft-points -o $@ \
|
---|
136 | $(GUESTADDITIONS_WIN32_FILESPEC) $(GUESTADDITIONS_LINUX_FILESPEC)
|
---|
137 |
|
---|
138 | #
|
---|
139 | # Remote building.
|
---|
140 | #
|
---|
141 | ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
|
---|
142 | OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions
|
---|
143 | $(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions
|
---|
144 | $(PATH_TARGET)/ts-remote-build-win32-additions:
|
---|
145 | $(RM) -f $@
|
---|
146 | $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD)
|
---|
147 | $(APPEND) $@
|
---|
148 |
|
---|
149 | endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
|
---|
150 |
|
---|
151 | build-win32-additions:
|
---|
152 | ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
|
---|
153 | $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
|
---|
154 | endif
|
---|
155 | $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing
|
---|
156 |
|
---|
157 |
|
---|
158 | # build the Linux installer on a remote machine
|
---|
159 | $(LINUXINSTALLER_CROSS):
|
---|
160 | 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"
|
---|
161 | 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"
|
---|
162 | 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"
|
---|
163 |
|
---|