VirtualBox

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

Last change on this file since 6359 was 6241, checked in by vboxsync, 17 years ago

Guest r3 lib for x11 mouse. The solaris mouse driver doesn't yet work like it should.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.3 KB
Line 
1# $Id: Makefile.kmk 6241 2008-01-04 16:25:30Z vboxsync $
2## @file
3# Top-level makefile for the VirtualBox Guest Additions.
4#
5# This makefile and all it's sub-makefiles are involved in remote
6# building of additions that cannot be build locally. Typically
7# tools/env.sh kmk -C src/VBox/Additions build-somehost-additions
8# is send as a command and the source tree is accessed using an
9# SMB mount.
10#
11# When doing these operations BUILD_TARGET remains the same (not
12# yet true for linux), and it's therefore important that
13# Config.kmk and all the involved (sub-)makefiles doesn't make
14# assumptions about BUILD_TARGET being the same as the additions
15# target.
16#
17# To setup the remote building of an addition target, let's call it
18# XYZ, you need to add VBOX_REMOTE_XYZ_ADDITIONS_BUILD to your
19# LocalConfig.kmk. The value is the command(s) required to execute
20# the equivalent to you locally executing kmk -C src/VBoxAdditions
21# build_xyz_additions. This means BUILD_TARGET* and BUILD_TYPE needs
22# to be specified.
23#
24
25#
26# Copyright (C) 2006-2007 innotek GmbH
27#
28# This file is part of VirtualBox Open Source Edition (OSE), as
29# available from http://www.virtualbox.org. This file is free software;
30# you can redistribute it and/or modify it under the terms of the GNU
31# General Public License (GPL) as published by the Free Software
32# Foundation, in version 2 as it comes in the "COPYING" file of the
33# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
34# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
35#
36
37DEPTH = ../../..
38include $(PATH_KBUILD)/subheader.kmk
39
40#
41# Make some indicator adjustments to keep things simple in these makefiles.
42#
43ifdef VBOX_ADDITIONS_LINUX_ONLY
44 VBOX_ADDITIONS_XYZ_ONLY = 1
45 VBOX_WITH_LINUX_ADDITIONS = 1
46 VBOX_REMOTE_LINUX_ADDITIONS_BUILD =
47 VBOX_WITH_WIN32_ADDITIONS =
48else ifdef VBOX_ADDITIONS_WIN32_ONLY
49 VBOX_ADDITIONS_XYZ_ONLY = 1
50 VBOX_WITH_WIN32_ADDITIONS = 1
51 VBOX_REMOTE_WIN32_ADDITIONS_BUILD =
52 VBOX_WITH_LINUX_ADDITIONS =
53endif
54ifdef VBOX_WITH_WIN32_ADDITIONS
55 VBOX_WITH_ADDITIONS_ISO.win.x86 = 1
56endif
57ifneq ($(VBOX_WITH_LINUX_ADDITIONS)$(VBOX_ADDITIONS_LINUX_CROSS),)
58 VBOX_WITH_ADDITIONS_ISO.linux.x86 = 1
59endif
60
61# Include sub-makefiles.
62include $(PATH_SUB_CURRENT)/common/Makefile.kmk
63ifdef VBOX_WITH_WIN32_ADDITIONS
64 ifndef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
65 include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
66 endif
67endif
68
69ifdef VBOX_WITH_LINUX_ADDITIONS
70 SUBDIRS += \
71 linux \
72 x11
73 LINUXINSTALLER = $(VBOX_PATH_ADDITIONS)/VBoxLinuxAdditions.run
74endif
75LINUXINSTALLER_CROSS = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions/VBoxLinuxAdditions.run
76ifdef VBOX_ADDITIONS_LINUX_CROSS
77 OTHER_CLEAN += $(LINUXINSTALLER_CROSS)
78 LINUXINSTALLER = $(LINUXINSTALLER_CROSS)
79endif
80
81# The packing target rule, but only if we're on the local build box.
82ifndef VBOX_WITHOUT_ADDITIONS_ISO
83 ifndef VBOX_ADDITIONS_XYZ_ONLY
84 ifneq ($(VBOX_WITH_WIN32_ADDITIONS)$(VBOX_WITH_LINUX_ADDITIONS),)
85 PACKING += $(if $(VBOX_OSE),,$(PATH_BIN)/additions/VBoxGuestAdditions.iso)
86 endif
87 endif
88endif
89
90# Solaris additions
91ifeq ($(BUILD_TARGET),solaris)
92 SUBDIRS += x11
93endif
94
95include $(PATH_KBUILD)/subfooter.kmk
96
97
98#
99# The x86 Windows .iso file spec.
100#
101ifdef VBOX_WITH_ADDITIONS_ISO.win.x86
102 ifdef VBOX_ONLY_ADDITIONS
103 VBOX_PATH_ADDITIONS.win.x86 = $(PATH_OUT_BASE)/win.x86/$(BUILD_TYPE)/bin/additions
104 else
105 VBOX_PATH_ADDITIONS.win.x86 = $(VBOX_PATH_ADDITIONS)
106 endif
107 ## @todo We're missing the .cat files and using the wrong .inf files here.
108 GUESTADDITIONS_FILESPEC.win.x86 = \
109 driver/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
110 driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
111 driver/VBoxGuest/VBoxService.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxService.exe \
112 driver/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
113 driver/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
114 driver/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
115 driver/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
116 driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
117 driver/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
118 driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
119 driver/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
120 gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
121 AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
122 AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
123 AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
124 VBoxGuestAdditions.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuestAdditions.exe \
125 AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
126 ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
127 GUESTADDITIONS_FILESPEC.win.x86 += \
128 driver/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
129 driver/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
130 endif
131 ## @todo remove GUESTADDITIONS_WIN32_DEPS when cleaning up later.
132 GUESTADDITIONS_WIN32_DEPS := $(filter-out %=deleteme=,,$(subst =,=deleteme= ,$(GUESTADDITIONS_FILESPEC.win.x86)))
133endif
134
135#
136# The OS/2 .iso file spec.
137#
138ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
139 ifdef VBOX_ONLY_ADDITIONS
140 VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(BUILD_TYPE)/bin/additions
141 else
142 VBOX_PATH_ADDITIONS.os2.x86 = $(VBOX_PATH_ADDITIONS)
143 endif
144 GUESTADDITIONS_FILESPEC.os2.x86 = \
145 os2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
146 os2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
147 os2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
148 os2/libc063.dll=./os2/Bin/libc063.dll \
149 os2/readme.txt=./os2/Bin/readme.txt \
150 os2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
151else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
152 GUESTADDITIONS_FILESPEC.os2.x86 = \
153 os2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
154 os2/VBoxService.exe=./os2/Bin/VBoxService.exe \
155 os2/gengradd.dll=./os2/Bin/gengradd.dll \
156 os2/libc063.dll=./os2/Bin/libc063.dll \
157 os2/readme.txt=./os2/Bin/readme.txt \
158 os2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
159endif
160
161#
162# The x86 Linux .iso file spec.
163#
164ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
165 ifneq ($(VBOX_ONLY_ADDITIONS)$(VBOX_ADDITIONS_LINUX_CROSS),)
166 VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions
167 else
168 VBOX_PATH_ADDITIONS.linux.x86 = $(VBOX_PATH_ADDITIONS)
169 endif
170 GUESTADDITIONS_FILESPEC.linux.x86 = \
171 VBoxLinuxAdditions.run=$(VBOX_PATH_ADDITIONS.linux.x86)/VBoxLinuxAdditions.run
172endif
173
174
175#
176# Build the Guest Additions ISO image.
177#
178ifndef VBOX_WITHOUT_ADDITIONS_ISO
179$(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
180 $(filter-out %=deleteme=,\
181 $(subst =,=deleteme= ,\
182 $(GUESTADDITIONS_FILESPEC.win.x86) \
183 $(GUESTADDITIONS_FILESPEC.linux.x86) \
184 $(GUESTADDITIONS_FILESPEC.os2.x86) \
185 )\
186 ) \
187 $(VBOX_SVN_REV_KMK) \
188 Makefile.kmk
189 $(call MSG_TOOL,mkisofs,,$@)
190 $(QUIET)$(MKDIR) -p $(@D)
191 $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 \
192 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
193 $(GUESTADDITIONS_FILESPEC.win.x86) \
194 $(GUESTADDITIONS_FILESPEC.linux.x86) \
195 $(GUESTADDITIONS_FILESPEC.os2.x86)
196endif
197
198
199#
200# Remote building (to be obsoleted).
201#
202ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
203OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions
204$(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions
205$(PATH_TARGET)/ts-remote-build-win32-additions:
206 $(RM) -f $@
207 $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD)
208 $(APPEND) $@
209
210endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
211
212build-win32-additions:
213ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
214 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
215endif
216 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing
217
218
219# build the Linux installer on a remote machine
220# TODO: Move the VBOX_REMOTE_LINUX32_ADDITIONS_BUILD stuff into LocalConfig.kmk on the x86 box.
221VBOX_REMOTE_LINUX32_ADDITIONS_BUILD ?= ssh vbox@$(VBOX_ADDITIONS_LINUX_CROSS_HOST) "./enter-rhel3-jail /mnt/tinderwin_vbox/w32-rel/tools/env.sh --no-wine kmk -C src/VBox/Additions build-linux32-additions BUILD_TYPE=release"
222$(LINUXINSTALLER_CROSS):
223 $(VBOX_REMOTE_LINUX32_ADDITIONS_BUILD)
224
225test-build-linux32-additions: $(LINUXINSTALLER_CROSS)
226build-linux32-additions:
227 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C ../Runtime
228 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C common
229 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C linux all packing
230
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