VirtualBox

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

Last change on this file since 29124 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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