VirtualBox

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

Last change on this file since 28399 was 27014, checked in by vboxsync, 15 years ago

makefiles: Preps for building the test suite.

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