1 | # $Id: Makefile.kmk 11348 2008-08-12 09:12:16Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VirtualBox Guest Additions.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | # additional information or have any questions.
|
---|
20 | #
|
---|
21 |
|
---|
22 | ifdef VBOX_KBUILD_HACKING
|
---|
23 | SUB_DEPTH = ../../..
|
---|
24 | else
|
---|
25 | SUB_DEPTH = .
|
---|
26 | DEPTH = ../../..
|
---|
27 | endif
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 | #
|
---|
31 | # Globals
|
---|
32 | #
|
---|
33 | VBOX_PATH_ADDITIONS_SRC := $(PATH_SUB_CURRENT)
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Cross building of the additions is generally done by remote building
|
---|
37 | # by means of smbfs, cifs, VBOX_ONLY_ADDITIONS=1 and setting KBUILD_TARGET
|
---|
38 | # and KBUILD_TARGET_ARCH to the desired target and architecture.
|
---|
39 | #
|
---|
40 | # Limited support for cross building the windows additions using wine
|
---|
41 | # is provided. There are a couple of issues with the approach (lack of
|
---|
42 | # signing, no VC++ 8 support, ++) that makes it unsuitable for releases.
|
---|
43 | #
|
---|
44 | #
|
---|
45 | # Note! VBOX_WITH_ADDITIONS is checked for by our parent makefile.
|
---|
46 | #
|
---|
47 | # Note! VBOX_WITH_X11_ADDITIONS is set in Config.kmk
|
---|
48 | #
|
---|
49 | # Note! The additions build box will set the VBOX_WITH_ADDITIONS_ISO.win.x86
|
---|
50 | # variables before invoking us from the root makefile.
|
---|
51 | #
|
---|
52 | # ==> All we have to worry about is what to do on the target we're on.
|
---|
53 | #
|
---|
54 | VBOX_WITH_ADDITIONS_ISO.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
|
---|
55 |
|
---|
56 | # Include sub-makefiles.
|
---|
57 | include $(PATH_SUB_CURRENT)/common/Makefile.kmk
|
---|
58 |
|
---|
59 | ifdef VBOX_WITH_X11_ADDITIONS
|
---|
60 | include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
|
---|
61 | endif
|
---|
62 |
|
---|
63 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
64 | include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk
|
---|
65 | endif
|
---|
66 | ifeq ($(KBUILD_TARGET),linux)
|
---|
67 | include $(PATH_SUB_CURRENT)/linux/Makefile.kmk
|
---|
68 | endif
|
---|
69 | #ifeq ($(KBUILD_TARGET),os2)
|
---|
70 | # include $(PATH_SUB_CURRENT)/os2/Makefile.kmk
|
---|
71 | #endif
|
---|
72 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
73 | include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
|
---|
74 | endif
|
---|
75 | ifeq ($(KBUILD_TARGET),win)
|
---|
76 | include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
|
---|
77 | endif
|
---|
78 |
|
---|
79 | # The packing target rule, but only if we're on the local build box.
|
---|
80 | # (VBOX_WITHOUT_ADDITIONS_ISO is used by the additions build box, see the root makefile.)
|
---|
81 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
82 | PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso
|
---|
83 | endif
|
---|
84 |
|
---|
85 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
86 |
|
---|
87 | #
|
---|
88 | # File per-OS/arch file specs for the additions iso (alphabetical order).
|
---|
89 | #
|
---|
90 | # We test for the VBOX_WITH_ADDITIONS_ISO.os.arch so that we don't have to
|
---|
91 | # do the $(if )'ing down where the GUESTADDITIONS_FILESPEC.os.arch down
|
---|
92 | # in the dependency list and mkisofs command.
|
---|
93 | #
|
---|
94 |
|
---|
95 | ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.amd64
|
---|
96 | VBOX_PATH_ADDITIONS.freebsd.amd64 = $(PATH_OUT_BASE)/freebsd.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
97 | GUESTADDITIONS_FILESPEC.freebsd.amd64 = \
|
---|
98 | VBoxFreeBSDAdditions-amd64.tbz=$(VBOX_PATH_ADDITIONS.freebsd.amd64)/VBoxFreeBSDAdditions.tbz
|
---|
99 | endif
|
---|
100 | ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.x86
|
---|
101 | VBOX_PATH_ADDITIONS.freebsd.x86 = $(PATH_OUT_BASE)/freebsd.x86/$(KBUILD_TYPE)/bin/additions
|
---|
102 | GUESTADDITIONS_FILESPEC.freebsd.x86 = \
|
---|
103 | VBoxFreeBSDAdditions-x86.tbz=$(VBOX_PATH_ADDITIONS.freebsd.x86)/VBoxFreeBSDAdditions.tbz
|
---|
104 | endif
|
---|
105 |
|
---|
106 |
|
---|
107 | ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
|
---|
108 | VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(KBUILD_TYPE)/bin/additions
|
---|
109 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
110 | 32Bit/OS2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
|
---|
111 | 32Bit/OS2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
|
---|
112 | 32Bit/OS2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
|
---|
113 | 32Bit/OS2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
114 | 32Bit/OS2/readme.txt=./os2/Bin/readme.txt \
|
---|
115 | 32Bit/OS2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
|
---|
116 | else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
|
---|
117 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
118 | 32Bit/OS2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
|
---|
119 | 32Bit/OS2/VBoxService.exe=./os2/Bin/VBoxService.exe \
|
---|
120 | 32Bit/OS2/gengradd.dll=./os2/Bin/gengradd.dll \
|
---|
121 | 32Bit/OS2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
122 | 32Bit/OS2/readme.txt=./os2/Bin/readme.txt \
|
---|
123 | 32Bit/OS2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
|
---|
124 | endif
|
---|
125 |
|
---|
126 |
|
---|
127 | ifdef VBOX_WITH_ADDITIONS_ISO.linux.amd64
|
---|
128 | VBOX_PATH_ADDITIONS.linux.amd64 = $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
129 | GUESTADDITIONS_FILESPEC.linux.amd64 = \
|
---|
130 | VBoxLinuxAdditions-amd64.run=$(VBOX_PATH_ADDITIONS.linux.amd64)/VBoxLinuxAdditions.run
|
---|
131 | endif
|
---|
132 | ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
|
---|
133 | VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions
|
---|
134 | ## @todo 64-bit additions: rename this package, update docs (?) and tests (?). create wrapper? create gnome/kde autorun app (xplatform) ?
|
---|
135 | GUESTADDITIONS_FILESPEC.linux.x86 = \
|
---|
136 | VBoxLinuxAdditions-x86.run=$(VBOX_PATH_ADDITIONS.linux.x86)/VBoxLinuxAdditions.run
|
---|
137 | endif
|
---|
138 |
|
---|
139 |
|
---|
140 | ifdef VBOX_WITH_ADDITIONS_ISO.solaris.amd64
|
---|
141 | VBOX_PATH_ADDITIONS.solaris.amd64 = $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
142 | GUESTADDITIONS_FILESPEC.solaris.amd64 = \
|
---|
143 | VBoxSolarisAdditions-amd64.pkg=$(VBOX_PATH_ADDITIONS.solaris.amd64)/VBoxSolarisAdditions.pkg
|
---|
144 | endif
|
---|
145 | ifdef VBOX_WITH_ADDITIONS_ISO.solaris.x86
|
---|
146 | VBOX_PATH_ADDITIONS.solaris.x86 = $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions
|
---|
147 | ## @todo 64-bit additions: rename this package, update docs (?) and tests (?).
|
---|
148 | GUESTADDITIONS_FILESPEC.solaris.x86 = \
|
---|
149 | VBoxSolarisAdditions-x86.pkg=$(VBOX_PATH_ADDITIONS.solaris.x86)/VBoxSolarisAdditions.pkg
|
---|
150 | endif
|
---|
151 |
|
---|
152 |
|
---|
153 | ifdef VBOX_WITH_ADDITIONS_ISO.win.amd64
|
---|
154 | ## @todo Take the .inf files from the output directories, they will all be edited I think...
|
---|
155 | # If that is not the case, do it in the signing ifdef below together with the .cat files.
|
---|
156 | VBOX_PATH_ADDITIONS.win.amd64 = $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions
|
---|
157 | GUESTADDITIONS_FILESPEC.win.amd64 = \
|
---|
158 | 64Bit/Windows/Drivers/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxGuest.sys \
|
---|
159 | 64Bit/Windows/Drivers/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
|
---|
160 | 64Bit/Windows/Drivers/VBoxGuest/VBoxTray.exe=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxTray.exe \
|
---|
161 | 64Bit/Windows/Drivers/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxHook.dll \
|
---|
162 | 64Bit/Windows/Drivers/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxControl.exe \
|
---|
163 | 64Bit/Windows/Drivers/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.amd64)/VBCoInst.dll \
|
---|
164 | 64Bit/Windows/Drivers/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxMouse.sys \
|
---|
165 | 64Bit/Windows/Drivers/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
166 | 64Bit/Windows/Drivers/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxVideo.sys \
|
---|
167 | 64Bit/Windows/Drivers/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
168 | 64Bit/Windows/Drivers/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxDisp.dll \
|
---|
169 | 64Bit/Windows/Gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxGINA.dll \
|
---|
170 | VBoxWindowsAdditions-amd64.exe=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxWindowsAdditions-amd64.exe
|
---|
171 | ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
|
---|
172 | GUESTADDITIONS_FILESPEC.win.amd64 += \
|
---|
173 | 64Bit/Windows/Drivers/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxSF.sys \
|
---|
174 | 64Bit/Windows/Drivers/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxMRXNP.dll
|
---|
175 | endif
|
---|
176 | ifdef VBOX_SIGNING_MODE
|
---|
177 | GUESTADDITIONS_FILESPEC.win.amd64 += \
|
---|
178 | 64Bit/Windows/Drivers/VBoxGuest/VBoxGuest.cat=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxGuest.cat \
|
---|
179 | 64Bit/Windows/Drivers/VBoxVideo/VBoxVideo.cat=$(VBOX_PATH_ADDITIONS.win.amd64)/VBoxVideo.cat
|
---|
180 | endif
|
---|
181 | endif
|
---|
182 |
|
---|
183 | ifdef VBOX_WITH_ADDITIONS_ISO.win.x86
|
---|
184 | ## @todo We're missing the .cat files and using the wrong .inf files here! This is kind of serious...
|
---|
185 | VBOX_PATH_ADDITIONS.win.x86 = $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/bin/additions
|
---|
186 | GUESTADDITIONS_FILESPEC.win.x86 = \
|
---|
187 | 32Bit/Windows/Drivers/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
|
---|
188 | 32Bit/Windows/Drivers/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
|
---|
189 | 32Bit/Windows/Drivers/VBoxGuest/VBoxTray.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxTray.exe \
|
---|
190 | 32Bit/Windows/Drivers/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
|
---|
191 | 32Bit/Windows/Drivers/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
|
---|
192 | 32Bit/Windows/Drivers/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
|
---|
193 | 32Bit/Windows/Drivers/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
|
---|
194 | 32Bit/Windows/Drivers/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
195 | 32Bit/Windows/Drivers/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
|
---|
196 | 32Bit/Windows/Drivers/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
197 | 32Bit/Windows/Drivers/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
|
---|
198 | 32Bit/Windows/Gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
|
---|
199 | 32Bit/Windows/3rdParty/AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
|
---|
200 | 32Bit/Windows/3rdParty/AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
|
---|
201 | 32Bit/Windows/3rdParty/AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
|
---|
202 | VBoxWindowsAdditions-x86.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxWindowsAdditions-x86.exe \
|
---|
203 | VBoxWindowsAdditions.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxWindowsAdditions.exe \
|
---|
204 | AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
|
---|
205 | ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
|
---|
206 | GUESTADDITIONS_FILESPEC.win.x86 += \
|
---|
207 | 32Bit/Windows/Drivers/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
|
---|
208 | 32Bit/Windows/Drivers/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
|
---|
209 | endif
|
---|
210 | ifdef VBOX_SIGNING_MODE
|
---|
211 | GUESTADDITIONS_FILESPEC.win.x86 += \
|
---|
212 | 32Bit/Windows/Drivers/VBoxGuest/VBoxGuest.cat=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.cat \
|
---|
213 | 32Bit/Windows/Drivers/VBoxVideo/VBoxVideo.cat=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.cat
|
---|
214 | endif
|
---|
215 | endif # win.x86
|
---|
216 |
|
---|
217 |
|
---|
218 | #
|
---|
219 | # Build the Guest Additions ISO image.
|
---|
220 | #
|
---|
221 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
222 | $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
|
---|
223 | $(filter-out %=deleteme=,\
|
---|
224 | $(subst =,=deleteme= ,\
|
---|
225 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
226 | $(GUESTADDITIONS_FILESPEC.win.amd64) \
|
---|
227 | $(GUESTADDITIONS_FILESPEC.solaris.x86) \
|
---|
228 | $(GUESTADDITIONS_FILESPEC.solaris.amd64) \
|
---|
229 | $(GUESTADDITIONS_FILESPEC.os2.x86) \
|
---|
230 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
231 | $(GUESTADDITIONS_FILESPEC.linux.amd64) \
|
---|
232 | $(GUESTADDITIONS_FILESPEC.freebsd.x86) \
|
---|
233 | $(GUESTADDITIONS_FILESPEC.freebsd.amd64) \
|
---|
234 | )\
|
---|
235 | ) \
|
---|
236 | $(VBOX_SVN_REV_KMK) \
|
---|
237 | $(VBOX_PATH_ADDITIONS_SRC)/Makefile.kmk
|
---|
238 | $(call MSG_TOOL,mkisofs,,$@)
|
---|
239 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
240 | @# use iso-level 3 which is the most ISO conforming level with least restrictions; iso-level 4 maps to iso-level 2
|
---|
241 | @# with some extra restrictions removal (not conforming to ISO9660) which some platforms like Solaris 10 does not like.
|
---|
242 | $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 3 \
|
---|
243 | -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
|
---|
244 | $(GUESTADDITIONS_FILESPEC.win) \
|
---|
245 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
246 | $(GUESTADDITIONS_FILESPEC.win.amd64) \
|
---|
247 | $(GUESTADDITIONS_FILESPEC.solaris.x86) \
|
---|
248 | $(GUESTADDITIONS_FILESPEC.solaris.amd64) \
|
---|
249 | $(GUESTADDITIONS_FILESPEC.os2.x86) \
|
---|
250 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
251 | $(GUESTADDITIONS_FILESPEC.linux.amd64) \
|
---|
252 | $(GUESTADDITIONS_FILESPEC.freebsd.x86) \
|
---|
253 | $(GUESTADDITIONS_FILESPEC.freebsd.amd64)
|
---|
254 |
|
---|
255 | # Alias for creating the iso.
|
---|
256 | .PHONY: additions-iso
|
---|
257 | additions-iso: $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso
|
---|
258 |
|
---|
259 | endif
|
---|
260 |
|
---|
261 |
|
---|