VirtualBox

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

Last change on this file since 6071 was 6053, checked in by vboxsync, 17 years ago

Additions build server hacking.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.2 KB
Line 
1# $Id: Makefile.kmk 6053 2007-12-11 15:20:21Z 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 += linux
71 LINUXINSTALLER = $(VBOX_PATH_ADDITIONS)/VBoxLinuxAdditions.run
72endif
73LINUXINSTALLER_CROSS = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions/VBoxLinuxAdditions.run
74ifdef VBOX_ADDITIONS_LINUX_CROSS
75 OTHER_CLEAN += $(LINUXINSTALLER_CROSS)
76 LINUXINSTALLER = $(LINUXINSTALLER_CROSS)
77endif
78
79# The packing target rule, but only if we're on the local build box.
80ifndef VBOX_WITHOUT_ADDITIONS_ISO
81 ifndef VBOX_ADDITIONS_XYZ_ONLY
82 ifneq ($(VBOX_WITH_WIN32_ADDITIONS)$(VBOX_WITH_LINUX_ADDITIONS),)
83 PACKING += $(if $(VBOX_OSE),,$(PATH_BIN)/additions/VBoxGuestAdditions.iso)
84 endif
85 endif
86endif
87
88include $(PATH_KBUILD)/subfooter.kmk
89
90
91#
92# The x86 Windows .iso file spec.
93#
94ifdef 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 VBOX_PATH_ADDITIONS.win.x86 = $(VBOX_PATH_ADDITIONS)
99 endif
100 ## @todo We're missing the .cat files and using the wrong .inf files here.
101 GUESTADDITIONS_FILESPEC.win.x86 = \
102 driver/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
103 driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
104 driver/VBoxGuest/VBoxService.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxService.exe \
105 driver/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
106 driver/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
107 driver/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
108 driver/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
109 driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
110 driver/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
111 driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
112 driver/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
113 gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
114 AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
115 AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
116 AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
117 VBoxGuestAdditions.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuestAdditions.exe \
118 AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
119 ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
120 GUESTADDITIONS_FILESPEC.win.x86 += \
121 driver/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
122 driver/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
123 endif
124 ## @todo remove GUESTADDITIONS_WIN32_DEPS when cleaning up later.
125 GUESTADDITIONS_WIN32_DEPS := $(filter-out %=deleteme=,,$(subst =,=deleteme= ,$(GUESTADDITIONS_FILESPEC.win.x86)))
126endif
127
128#
129# The OS/2 .iso file spec.
130#
131ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
132 ifdef VBOX_ONLY_ADDITIONS
133 VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(BUILD_TYPE)/bin/additions
134 else
135 VBOX_PATH_ADDITIONS.os2.x86 = $(VBOX_PATH_ADDITIONS)
136 endif
137 GUESTADDITIONS_FILESPEC.os2.x86 = \
138 os2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
139 os2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
140 os2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
141 os2/libc063.dll=./os2/Bin/libc063.dll \
142 os2/readme.txt=./os2/Bin/readme.txt \
143 os2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
144else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
145 GUESTADDITIONS_FILESPEC.os2.x86 = \
146 os2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
147 os2/VBoxService.exe=./os2/Bin/VBoxService.exe \
148 os2/gengradd.dll=./os2/Bin/gengradd.dll \
149 os2/libc063.dll=./os2/Bin/libc063.dll \
150 os2/readme.txt=./os2/Bin/readme.txt \
151 os2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
152endif
153
154#
155# The x86 Linux .iso file spec.
156#
157ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
158 ifneq ($(VBOX_ONLY_ADDITIONS)$(VBOX_ADDITIONS_LINUX_CROSS),)
159 VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions
160 else
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
165endif
166
167
168#
169# Build the Guest Additions ISO image.
170#
171ifndef VBOX_WITHOUT_ADDITIONS_ISO
172$(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
173 $(filter-out %=deleteme=,\
174 $(subst =,=deleteme= ,\
175 $(GUESTADDITIONS_FILESPEC.win.x86) \
176 $(GUESTADDITIONS_FILESPEC.linux.x86) \
177 $(GUESTADDITIONS_FILESPEC.os2.x86) \
178 )\
179 ) \
180 $(VBOX_SVN_REV_KMK) \
181 Makefile.kmk
182 $(call MSG_TOOL,mkisofs,,$@)
183 $(QUIET)$(MKDIR) -p $(@D)
184 $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 \
185 -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
186 $(GUESTADDITIONS_FILESPEC.win.x86) \
187 $(GUESTADDITIONS_FILESPEC.linux.x86) \
188 $(GUESTADDITIONS_FILESPEC.os2.x86)
189endif
190
191
192#
193# Remote building (to be obsoleted).
194#
195ifdef VBOX_REMOTE_WIN32_ADDITIONS_BUILD
196OTHER_CLEAN += $(PATH_TARGET)/ts-remote-build-win32-additions
197$(GUESTADDITIONS_WIN32_DEPS): $(PATH_TARGET)/ts-remote-build-win32-additions
198$(PATH_TARGET)/ts-remote-build-win32-additions:
199 $(RM) -f $@
200 $(VBOX_REMOTE_WIN32_ADDITIONS_BUILD)
201 $(APPEND) $@
202
203endif # VBOX_REMOTE_BUILD_WIN32_ADDITIONS
204
205build-win32-additions:
206ifneq ($(BUILD_TARGET),linux) # Nothing is signed here and wine is faster building it.
207 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C ../Runtime
208endif
209 $(KMK) VBOX_ADDITIONS_WIN32_ONLY=1 -C . all packing
210
211
212# build the Linux installer on a remote machine
213# TODO: Move the VBOX_REMOTE_LINUX32_ADDITIONS_BUILD stuff into LocalConfig.kmk on the x86 box.
214VBOX_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"
215$(LINUXINSTALLER_CROSS):
216 $(VBOX_REMOTE_LINUX32_ADDITIONS_BUILD)
217
218test-build-linux32-additions: $(LINUXINSTALLER_CROSS)
219build-linux32-additions:
220 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C ../Runtime
221 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C common
222 $(KMK) VBOX_ADDITIONS_LINUX_ONLY=1 -C linux all packing
223
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