1 | # $Id: Makefile.kmk 8155 2008-04-18 15:16:47Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VirtualBox Guest Additions.
|
---|
4 | #
|
---|
5 | # Cross building of the additions is generally done by remote building
|
---|
6 | # by means of smbfs, cifs, VBOX_ONLY_ADDITIONS=1 and setting BUILD_TARGET
|
---|
7 | # to the desired target.
|
---|
8 | #
|
---|
9 | # Limited support for cross building the windows additions using wine
|
---|
10 | # is provided. There are a couple of issues with the approach (lack of
|
---|
11 | # signing, no VC++ 8 support, ++) that makes it unsuitable for releases.
|
---|
12 | #
|
---|
13 | # Building the linux additions as part of the l4 build is ok because
|
---|
14 | # l4 is built on a linux platform. This is why we have to check if
|
---|
15 | # BUILD_TARGET is l4 or linux in some places, though most of the magic
|
---|
16 | # is done in the templates (Config.kmk).
|
---|
17 | #
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
21 | #
|
---|
22 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
23 | # available from http://www.virtualbox.org. This file is free software;
|
---|
24 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
25 | # General Public License (GPL) as published by the Free Software
|
---|
26 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
27 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
28 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
29 | #
|
---|
30 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
31 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
32 | # additional information or have any questions.
|
---|
33 | #
|
---|
34 |
|
---|
35 | DEPTH = ../../..
|
---|
36 | include $(PATH_KBUILD)/subheader.kmk
|
---|
37 |
|
---|
38 | #
|
---|
39 | # Make some indicator adjustments to keep things simple in these makefiles.
|
---|
40 | #
|
---|
41 | ifdef VBOX_ADDITIONS_LINUX_ONLY
|
---|
42 | VBOX_ADDITIONS_XYZ_ONLY = 1
|
---|
43 | VBOX_WITH_LINUX_ADDITIONS = 1
|
---|
44 | VBOX_WITH_WIN32_ADDITIONS =
|
---|
45 | else ifdef VBOX_ADDITIONS_WIN32_ONLY
|
---|
46 | VBOX_ADDITIONS_XYZ_ONLY = 1
|
---|
47 | VBOX_WITH_WIN32_ADDITIONS = 1
|
---|
48 | VBOX_WITH_LINUX_ADDITIONS =
|
---|
49 | endif
|
---|
50 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
51 | VBOX_WITH_ADDITIONS_ISO.win.x86 = 1
|
---|
52 | endif
|
---|
53 | ifdef VBOX_WITH_LINUX_ADDITIONS
|
---|
54 | VBOX_WITH_ADDITIONS_ISO.linux.x86 = 1
|
---|
55 | endif
|
---|
56 | ifeq ($(BUILD_TARGET),solaris)
|
---|
57 | VBOX_WITH_ADDITIONS_ISO.solaris.x86 = 1
|
---|
58 | endif
|
---|
59 | ifeq ($(BUILD_TARGET),freebsd)
|
---|
60 | VBOX_WITH_ADDITIONS_ISO.freebsd.x86 = 1
|
---|
61 | endif
|
---|
62 |
|
---|
63 | # Include sub-makefiles.
|
---|
64 | include $(PATH_SUB_CURRENT)/common/Makefile.kmk
|
---|
65 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
66 | include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
|
---|
67 | endif
|
---|
68 | ifdef VBOX_WITH_LINUX_ADDITIONS
|
---|
69 | include $(PATH_SUB_CURRENT)/linux/Makefile.kmk
|
---|
70 | endif
|
---|
71 | ifdef VBOX_WITH_X11_ADDITIONS
|
---|
72 | include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
|
---|
73 | endif
|
---|
74 | ifeq ($(BUILD_TARGET),solaris)
|
---|
75 | include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
|
---|
76 | endif
|
---|
77 | ifeq ($(BUILD_TARGET),freebsd)
|
---|
78 | include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk
|
---|
79 | endif
|
---|
80 |
|
---|
81 | # The packing target rule, but only if we're on the local build box.
|
---|
82 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
83 | ifndef VBOX_ADDITIONS_XYZ_ONLY
|
---|
84 | PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso
|
---|
85 | endif
|
---|
86 | endif
|
---|
87 |
|
---|
88 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
89 |
|
---|
90 |
|
---|
91 | #
|
---|
92 | # The x86 Windows .iso file spec.
|
---|
93 | #
|
---|
94 | ifdef VBOX_WITH_ADDITIONS_ISO.win.x86
|
---|
95 | ifdef VBOX_ONLY_ADDITIONS
|
---|
96 | VBOX_PATH_ADDITIONS.win.x86 = $(PATH_OUT_BASE)/win.x86/$(BUILD_TYPE)/bin/additions
|
---|
97 | else
|
---|
98 | # 32-only hack
|
---|
99 | VBOX_PATH_ADDITIONS.win.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
100 | endif
|
---|
101 | ## @todo We're missing the .cat files and using the wrong .inf files here.
|
---|
102 | GUESTADDITIONS_FILESPEC.win.x86 = \
|
---|
103 | driver/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
|
---|
104 | driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
|
---|
105 | driver/VBoxGuest/VBoxService.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxService.exe \
|
---|
106 | driver/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
|
---|
107 | driver/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
|
---|
108 | driver/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
|
---|
109 | driver/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
|
---|
110 | driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
111 | driver/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
|
---|
112 | driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
113 | driver/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
|
---|
114 | gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
|
---|
115 | AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
|
---|
116 | AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
|
---|
117 | AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
|
---|
118 | VBoxGuestAdditions.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuestAdditions.exe \
|
---|
119 | AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
|
---|
120 | ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
|
---|
121 | GUESTADDITIONS_FILESPEC.win.x86 += \
|
---|
122 | driver/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
|
---|
123 | driver/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
|
---|
124 | endif
|
---|
125 | endif
|
---|
126 |
|
---|
127 | #
|
---|
128 | # The OS/2 .iso file spec.
|
---|
129 | #
|
---|
130 | ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
|
---|
131 | ifdef VBOX_ONLY_ADDITIONS
|
---|
132 | VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(BUILD_TYPE)/bin/additions
|
---|
133 | else
|
---|
134 | VBOX_PATH_ADDITIONS.os2.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
135 | endif
|
---|
136 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
137 | os2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
|
---|
138 | os2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
|
---|
139 | os2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
|
---|
140 | os2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
141 | os2/readme.txt=./os2/Bin/readme.txt \
|
---|
142 | os2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
|
---|
143 | else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
|
---|
144 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
145 | os2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
|
---|
146 | os2/VBoxService.exe=./os2/Bin/VBoxService.exe \
|
---|
147 | os2/gengradd.dll=./os2/Bin/gengradd.dll \
|
---|
148 | os2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
149 | os2/readme.txt=./os2/Bin/readme.txt \
|
---|
150 | os2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
|
---|
151 | endif
|
---|
152 |
|
---|
153 | #
|
---|
154 | # The x86 Linux .iso file spec.
|
---|
155 | #
|
---|
156 | ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
|
---|
157 | ifdef VBOX_ONLY_ADDITIONS
|
---|
158 | VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions
|
---|
159 | else
|
---|
160 | # 32-bit only hack
|
---|
161 | VBOX_PATH_ADDITIONS.linux.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
162 | endif
|
---|
163 | GUESTADDITIONS_FILESPEC.linux.x86 = \
|
---|
164 | VBoxLinuxAdditions.run=$(VBOX_PATH_ADDITIONS.linux.x86)/VBoxLinuxAdditions.run
|
---|
165 | endif
|
---|
166 |
|
---|
167 |
|
---|
168 | #
|
---|
169 | # The x86 Solaris .iso file spec.
|
---|
170 | #
|
---|
171 | ifdef VBOX_WITH_ADDITIONS_ISO.solaris.x86
|
---|
172 | ifdef VBOX_ONLY_ADDITIONS
|
---|
173 | VBOX_PATH_ADDITIONS.solaris.x86 = $(PATH_OUT_BASE)/solaris.x86/$(BUILD_TYPE)/bin/additions
|
---|
174 | else
|
---|
175 | # 32-bit only hack
|
---|
176 | VBOX_PATH_ADDITIONS.solaris.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
177 | endif
|
---|
178 | GUESTADDITIONS_FILESPEC.solaris.x86 = \
|
---|
179 | VBoxSolarisAdditions.pkg=$(VBOX_PATH_ADDITIONS.solaris.x86)/VBoxSolarisAdditions.pkg
|
---|
180 | endif
|
---|
181 |
|
---|
182 | #
|
---|
183 | # The x86 FreeBSD .iso file spec.
|
---|
184 | #
|
---|
185 | ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.x86
|
---|
186 | ifdef VBOX_ONLY_ADDITIONS
|
---|
187 | VBOX_PATH_ADDITIONS.freebsd.x86 = $(PATH_OUT_BASE)/freebsd.x86/$(BUILD_TYPE)/bin/additions
|
---|
188 | else
|
---|
189 | # 32-bit only hack
|
---|
190 | VBOX_PATH_ADDITIONS.freebsd.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
191 | endif
|
---|
192 | GUESTADDITIONS_FILESPEC.freebsd.x86 = \
|
---|
193 | VBoxFreeBSDAdditions.tbz=$(VBOX_PATH_ADDITIONS.freebsd.x86)/VBoxFreeBSDAdditions.tbz
|
---|
194 | endif
|
---|
195 |
|
---|
196 | #
|
---|
197 | # Build the Guest Additions ISO image.
|
---|
198 | #
|
---|
199 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
200 | $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
|
---|
201 | $(filter-out %=deleteme=,\
|
---|
202 | $(subst =,=deleteme= ,\
|
---|
203 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
204 | $(GUESTADDITIONS_FILESPEC.solaris.x86) \
|
---|
205 | $(GUESTADDITIONS_FILESPEC.os2.x86) \
|
---|
206 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
207 | $(GUESTADDITIONS_FILESPEC.freebsd.x86) \
|
---|
208 | )\
|
---|
209 | ) \
|
---|
210 | $(VBOX_SVN_REV_KMK) \
|
---|
211 | Makefile.kmk
|
---|
212 | $(call MSG_TOOL,mkisofs,,$@)
|
---|
213 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
214 | $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 \
|
---|
215 | -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
|
---|
216 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
217 | $(GUESTADDITIONS_FILESPEC.solaris.x86) \
|
---|
218 | $(GUESTADDITIONS_FILESPEC.os2.x86) \
|
---|
219 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
220 | $(GUESTADDITIONS_FILESPEC.freebsd.x86)
|
---|
221 | endif
|
---|
222 |
|
---|
223 |
|
---|