VirtualBox

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

Last change on this file since 10085 was 10085, checked in by vboxsync, 16 years ago

Guest Additions: New layout of VBoxGuestAdditions.iso (32- and 64-bit).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.3 KB
Line 
1# $Id: Makefile.kmk 10085 2008-07-02 08:39:33Z 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
22DEPTH = ../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# Cross building of the additions is generally done by remote building
27# by means of smbfs, cifs, VBOX_ONLY_ADDITIONS=1 and setting KBUILD_TARGET
28# and KBUILD_TARGET_ARCH to the desired target and architecture.
29#
30# Limited support for cross building the windows additions using wine
31# is provided. There are a couple of issues with the approach (lack of
32# signing, no VC++ 8 support, ++) that makes it unsuitable for releases.
33#
34#
35# Note! VBOX_WITH_ADDITIONS is checked for by our parent makefile.
36#
37# Note! VBOX_WITH_X11_ADDITIONS is set in Config.kmk
38#
39# Note! The additions build box will set the VBOX_WITH_ADDITIONS_ISO.win.x86
40# variables before invoking us from the root makefile.
41#
42# ==> All we have to worry about is what to do on the target we're on.
43#
44VBOX_WITH_ADDITIONS_ISO.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = 1
45
46# Include sub-makefiles.
47include $(PATH_SUB_CURRENT)/common/Makefile.kmk
48
49ifdef VBOX_WITH_X11_ADDITIONS
50 include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
51endif
52
53ifeq ($(KBUILD_TARGET),freebsd)
54 include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk
55endif
56ifeq ($(KBUILD_TARGET),linux)
57 include $(PATH_SUB_CURRENT)/linux/Makefile.kmk
58endif
59#ifeq ($(KBUILD_TARGET),os2)
60# include $(PATH_SUB_CURRENT)/os2/Makefile.kmk
61#endif
62ifeq ($(KBUILD_TARGET),solaris)
63 include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk
64endif
65ifeq ($(KBUILD_TARGET),win)
66 include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
67endif
68
69# The packing target rule, but only if we're on the local build box.
70# (VBOX_WITHOUT_ADDITIONS_ISO is used by the additions build box, see the root makefile.)
71ifndef VBOX_WITHOUT_ADDITIONS_ISO
72 PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso
73endif
74
75include $(KBUILD_PATH)/subfooter.kmk
76
77#
78# File per-OS/arch file specs for the additions iso (alphabetical order).
79#
80# We test for the VBOX_WITH_ADDITIONS_ISO.os.arch so that we don't have to
81# do the $(if )'ing down where the GUESTADDITIONS_FILESPEC.os.arch down
82# in the dependency list and mkisofs command.
83#
84
85ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.amd64
86 VBOX_PATH_ADDITIONS.freebsd.amd64 = $(PATH_OUT_BASE)/freebsd.amd64/$(KBUILD_TYPE)/bin/additions
87 GUESTADDITIONS_FILESPEC.freebsd.amd64 = \
88 VBoxFreeBSDAdditions-amd64.tbz=$(VBOX_PATH_ADDITIONS.freebsd.amd64)/VBoxFreeBSDAdditions.tbz
89endif
90ifdef VBOX_WITH_ADDITIONS_ISO.freebsd.x86
91 VBOX_PATH_ADDITIONS.freebsd.x86 = $(PATH_OUT_BASE)/freebsd.x86/$(KBUILD_TYPE)/bin/additions
92 GUESTADDITIONS_FILESPEC.freebsd.x86 = \
93 VBoxFreeBSDAdditions-x86.tbz=$(VBOX_PATH_ADDITIONS.freebsd.x86)/VBoxFreeBSDAdditions.tbz
94endif
95
96
97ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
98 VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(KBUILD_TYPE)/bin/additions
99 GUESTADDITIONS_FILESPEC.os2.x86 = \
100 32Bit/OS2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
101 32Bit/OS2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
102 32Bit/OS2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
103 32Bit/OS2/libc063.dll=./os2/Bin/libc063.dll \
104 32Bit/OS2/readme.txt=./os2/Bin/readme.txt \
105 32Bit/OS2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
106else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
107 GUESTADDITIONS_FILESPEC.os2.x86 = \
108 32Bit/OS2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
109 32Bit/OS2/VBoxService.exe=./os2/Bin/VBoxService.exe \
110 32Bit/OS2/gengradd.dll=./os2/Bin/gengradd.dll \
111 32Bit/OS2/libc063.dll=./os2/Bin/libc063.dll \
112 32Bit/OS2/readme.txt=./os2/Bin/readme.txt \
113 32Bit/OS2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
114endif
115
116
117ifdef VBOX_WITH_ADDITIONS_ISO.linux.amd64
118 VBOX_PATH_ADDITIONS.linux.amd64 = $(PATH_OUT_BASE)/linux.amd64/$(KBUILD_TYPE)/bin/additions
119 GUESTADDITIONS_FILESPEC.linux.amd64 = \
120 VBoxLinuxAdditions-amd64.run=$(VBOX_PATH_ADDITIONS.linux.amd64)/VBoxLinuxAdditions.run
121endif
122ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
123 VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(KBUILD_TYPE)/bin/additions
124## @todo 64-bit additions: rename this package, update docs (?) and tests (?). create wrapper? create gnome/kde autorun app (xplatform) ?
125 GUESTADDITIONS_FILESPEC.linux.x86 = \
126 VBoxLinuxAdditions-x86.run=$(VBOX_PATH_ADDITIONS.linux.x86)/VBoxLinuxAdditions.run
127endif
128
129
130ifdef VBOX_WITH_ADDITIONS_ISO.solaris.amd64
131 VBOX_PATH_ADDITIONS.solaris.amd64 = $(PATH_OUT_BASE)/solaris.amd64/$(KBUILD_TYPE)/bin/additions
132 GUESTADDITIONS_FILESPEC.solaris.amd64 = \
133 VBoxSolarisAdditions-amd64.pkg=$(VBOX_PATH_ADDITIONS.solaris.amd64)/VBoxSolarisAdditions.pkg
134endif
135ifdef VBOX_WITH_ADDITIONS_ISO.solaris.x86
136 VBOX_PATH_ADDITIONS.solaris.x86 = $(PATH_OUT_BASE)/solaris.x86/$(KBUILD_TYPE)/bin/additions
137## @todo 64-bit additions: rename this package, update docs (?) and tests (?).
138 GUESTADDITIONS_FILESPEC.solaris.x86 = \
139 VBoxSolarisAdditions-x86.pkg=$(VBOX_PATH_ADDITIONS.solaris.x86)/VBoxSolarisAdditions.pkg
140endif
141
142
143ifdef VBOX_WITH_ADDITIONS_ISO.win.amd64
144 ## @todo 64-bit windows additions:
145 # It's going to be most of the files from above, except they must not have the same name on
146 # the iso (left hand side).
147 # We probably an autorun wrapper which launches the right installer, unless there is
148 # some Autorun.inf magic for this or that it can be done from the x86 installer.
149 # Also, we MUST fix the .inf / .cat problem mentioned in the todo above.
150endif
151ifdef VBOX_WITH_ADDITIONS_ISO.win.x86
152 ## @todo We're missing the .cat files and using the wrong .inf files here! This is kind of serious...
153 VBOX_PATH_ADDITIONS.win.x86 = $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/bin/additions
154 GUESTADDITIONS_FILESPEC.win.x86 = \
155 32Bit/Windows/Drivers/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
156 32Bit/Windows/Drivers/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
157 32Bit/Windows/Drivers/VBoxGuest/VBoxTray.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxTray.exe \
158 32Bit/Windows/Drivers/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
159 32Bit/Windows/Drivers/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
160 32Bit/Windows/Drivers/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
161 32Bit/Windows/Drivers/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
162 32Bit/Windows/Drivers/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
163 32Bit/Windows/Drivers/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
164 32Bit/Windows/Drivers/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
165 32Bit/Windows/Drivers/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
166 32Bit/Windows/Gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
167 32Bit/Windows/3rdParty/AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
168 32Bit/Windows/3rdParty/AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
169 32Bit/Windows/3rdParty/AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
170 VBoxWindowsAdditions-x86.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuestAdditions-x86.exe \
171 AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
172 ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
173 GUESTADDITIONS_FILESPEC.win.x86 += \
174 32Bit/Windows/Drivers/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
175 32Bit/Windows/Drivers/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
176 endif
177endif # win.x86
178
179
180#
181# Build the Guest Additions ISO image.
182#
183ifndef VBOX_WITHOUT_ADDITIONS_ISO
184$(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
185 $(filter-out %=deleteme=,\
186 $(subst =,=deleteme= ,\
187 $(GUESTADDITIONS_FILESPEC.win.x86) \
188 $(GUESTADDITIONS_FILESPEC.win.amd64) \
189 $(GUESTADDITIONS_FILESPEC.solaris.x86) \
190 $(GUESTADDITIONS_FILESPEC.solaris.amd64) \
191 $(GUESTADDITIONS_FILESPEC.os2.x86) \
192 $(GUESTADDITIONS_FILESPEC.linux.x86) \
193 $(GUESTADDITIONS_FILESPEC.linux.amd64) \
194 $(GUESTADDITIONS_FILESPEC.freebsd.x86) \
195 $(GUESTADDITIONS_FILESPEC.freebsd.amd64) \
196 )\
197 ) \
198 $(VBOX_SVN_REV_KMK) \
199 Makefile.kmk
200 $(call MSG_TOOL,mkisofs,,$@)
201 $(QUIET)$(MKDIR) -p $(@D)
202 @# use iso-level 3 which is the most ISO conforming level with least restrictions; iso-level 4 maps to iso-level 2
203 @# with some extra restrictions removal (not conforming to ISO9660) which some platforms like Solaris 10 does not like.
204 $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 3 \
205 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
206 $(GUESTADDITIONS_FILESPEC.win.x86) \
207 $(GUESTADDITIONS_FILESPEC.win.amd64) \
208 $(GUESTADDITIONS_FILESPEC.solaris.x86) \
209 $(GUESTADDITIONS_FILESPEC.solaris.amd64) \
210 $(GUESTADDITIONS_FILESPEC.os2.x86) \
211 $(GUESTADDITIONS_FILESPEC.linux.x86) \
212 $(GUESTADDITIONS_FILESPEC.linux.amd64) \
213 $(GUESTADDITIONS_FILESPEC.freebsd.x86) \
214 $(GUESTADDITIONS_FILESPEC.freebsd.amd64)
215endif
216
217
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