1 | # $Id: Makefile.kmk 6757 2008-02-02 08:51:14Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VirtualBox Guest Additions.
|
---|
4 | #
|
---|
5 | # Cross building of the additions is generally done by remote building
|
---|
6 | # by means of smbfs, cifs, VBOX_ONLY_ADDITIONS=1 and setting BUILD_TARGET
|
---|
7 | # to the desired target.
|
---|
8 | #
|
---|
9 | # Limited support for cross building the windows additions using wine
|
---|
10 | # is provided. There are a couple of issues with the approach (lack of
|
---|
11 | # signing, no VC++ 8 support, ++) that makes it unsuitable for releases.
|
---|
12 | #
|
---|
13 | # Building the linux additions as part of the l4 build is ok because
|
---|
14 | # l4 is built on a linux platform. This is why we have to check if
|
---|
15 | # BUILD_TARGET is l4 or linux in some places, though most of the magic
|
---|
16 | # is done in the templates (Config.kmk).
|
---|
17 | #
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Copyright (C) 2006-2007 innotek GmbH
|
---|
21 | #
|
---|
22 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
23 | # available from http://www.virtualbox.org. This file is free software;
|
---|
24 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
25 | # General Public License (GPL) as published by the Free Software
|
---|
26 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
27 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
28 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
29 | #
|
---|
30 |
|
---|
31 | DEPTH = ../../..
|
---|
32 | include $(PATH_KBUILD)/subheader.kmk
|
---|
33 |
|
---|
34 | #
|
---|
35 | # Make some indicator adjustments to keep things simple in these makefiles.
|
---|
36 | #
|
---|
37 | ifdef VBOX_ADDITIONS_LINUX_ONLY
|
---|
38 | VBOX_ADDITIONS_XYZ_ONLY = 1
|
---|
39 | VBOX_WITH_LINUX_ADDITIONS = 1
|
---|
40 | VBOX_WITH_WIN32_ADDITIONS =
|
---|
41 | else ifdef VBOX_ADDITIONS_WIN32_ONLY
|
---|
42 | VBOX_ADDITIONS_XYZ_ONLY = 1
|
---|
43 | VBOX_WITH_WIN32_ADDITIONS = 1
|
---|
44 | VBOX_WITH_LINUX_ADDITIONS =
|
---|
45 | endif
|
---|
46 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
47 | VBOX_WITH_ADDITIONS_ISO.win.x86 = 1
|
---|
48 | endif
|
---|
49 | ifdef VBOX_WITH_LINUX_ADDITIONS
|
---|
50 | VBOX_WITH_ADDITIONS_ISO.linux.x86 = 1
|
---|
51 | endif
|
---|
52 |
|
---|
53 | # Include sub-makefiles.
|
---|
54 | include $(PATH_SUB_CURRENT)/common/Makefile.kmk
|
---|
55 | ifdef VBOX_WITH_WIN32_ADDITIONS
|
---|
56 | include $(PATH_SUB_CURRENT)/WINNT/Makefile.kmk
|
---|
57 | endif
|
---|
58 | ifdef VBOX_WITH_LINUX_ADDITIONS
|
---|
59 | include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
|
---|
60 | include $(PATH_SUB_CURRENT)/linux/Makefile.kmk
|
---|
61 | else if1of ($(BUILD_TARGET), solaris)
|
---|
62 | include $(PATH_SUB_CURRENT)/x11/Makefile.kmk
|
---|
63 | endif
|
---|
64 |
|
---|
65 | # The packing target rule, but only if we're on the local build box.
|
---|
66 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
67 | ifndef VBOX_ADDITIONS_XYZ_ONLY
|
---|
68 | PACKING += $(PATH_BIN)/additions/VBoxGuestAdditions.iso
|
---|
69 | endif
|
---|
70 | endif
|
---|
71 |
|
---|
72 | include $(PATH_KBUILD)/subfooter.kmk
|
---|
73 |
|
---|
74 |
|
---|
75 | #
|
---|
76 | # The x86 Windows .iso file spec.
|
---|
77 | #
|
---|
78 | ifdef VBOX_WITH_ADDITIONS_ISO.win.x86
|
---|
79 | ifdef VBOX_ONLY_ADDITIONS
|
---|
80 | VBOX_PATH_ADDITIONS.win.x86 = $(PATH_OUT_BASE)/win.x86/$(BUILD_TYPE)/bin/additions
|
---|
81 | else
|
---|
82 | VBOX_PATH_ADDITIONS.win.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
83 | endif
|
---|
84 | ## @todo We're missing the .cat files and using the wrong .inf files here.
|
---|
85 | GUESTADDITIONS_FILESPEC.win.x86 = \
|
---|
86 | driver/VBoxGuest/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuest.sys \
|
---|
87 | driver/VBoxGuest/VBoxGuest.inf=./WINNT/VBoxGuest/VBoxGuest.inf \
|
---|
88 | driver/VBoxGuest/VBoxService.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxService.exe \
|
---|
89 | driver/VBoxGuest/VBoxHook.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxHook.dll \
|
---|
90 | driver/VBoxGuest/VBoxControl.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxControl.exe \
|
---|
91 | driver/VBoxGuest/VBCoInst.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBCoInst.dll \
|
---|
92 | driver/VBoxGuest/VBoxMouse.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMouse.sys \
|
---|
93 | driver/VBoxGuest/VBoxMouse.inf=./WINNT/MouseFilter/VBoxMouse.inf \
|
---|
94 | driver/VBoxVideo/VBoxVideo.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxVideo.sys \
|
---|
95 | driver/VBoxVideo/VBoxVideo.inf=./WINNT/Graphics/Miniport/VBoxVideo.inf \
|
---|
96 | driver/VBoxVideo/VBoxDisp.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxDisp.dll \
|
---|
97 | gina/VBoxGINA.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGINA.dll \
|
---|
98 | AMD_PCnet/netamd.inf=./WINNT/Network/AMD/netamd.inf \
|
---|
99 | AMD_PCnet/pcntpci5.cat=./WINNT/Network/AMD/pcntpci5.cat \
|
---|
100 | AMD_PCnet/PCNTPCI5.sys=./WINNT/Network/AMD/PCNTPCI5.sys \
|
---|
101 | VBoxGuestAdditions.exe=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxGuestAdditions.exe \
|
---|
102 | AUTORUN.INF=./WINNT/Installer/AUTORUN.INF
|
---|
103 | ifdef VBOX_WITH_WIN32_ADDITIONS_SHAREDFOLDERS
|
---|
104 | GUESTADDITIONS_FILESPEC.win.x86 += \
|
---|
105 | driver/VBoxSF/VBoxSF.sys=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxSF.sys \
|
---|
106 | driver/VBoxSF/VBoxMRXNP.dll=$(VBOX_PATH_ADDITIONS.win.x86)/VBoxMRXNP.dll
|
---|
107 | endif
|
---|
108 | endif
|
---|
109 |
|
---|
110 | #
|
---|
111 | # The OS/2 .iso file spec.
|
---|
112 | #
|
---|
113 | ifdef VBOX_WITH_ADDITIONS_ISO.os2.x86
|
---|
114 | ifdef VBOX_ONLY_ADDITIONS
|
---|
115 | VBOX_PATH_ADDITIONS.os2.x86 = $(PATH_OUT_BASE)/os2.x86/$(BUILD_TYPE)/bin/additions
|
---|
116 | else
|
---|
117 | VBOX_PATH_ADDITIONS.os2.x86 = $(VBOX_PATH_ADDITIONS)
|
---|
118 | endif
|
---|
119 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
120 | os2/VBoxGuest.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxGuest.sys \
|
---|
121 | os2/VBoxService.exe=$(VBOX_PATH_ADDITIONS.os2.x86)/VBoxService.exe \
|
---|
122 | os2/gengradd.dll=$(VBOX_PATH_ADDITIONS.os2.x86)/gengradd.dll \
|
---|
123 | os2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
124 | os2/readme.txt=./os2/Bin/readme.txt \
|
---|
125 | os2/vboxmouse.sys=$(VBOX_PATH_ADDITIONS.os2.x86)/vboxmouse.sys
|
---|
126 | else ifdef VBOX_WITH_OS2_ADDITIONS_BIN
|
---|
127 | GUESTADDITIONS_FILESPEC.os2.x86 = \
|
---|
128 | os2/VBoxGuest.sys=./os2/Bin/VBoxGuest.sys \
|
---|
129 | os2/VBoxService.exe=./os2/Bin/VBoxService.exe \
|
---|
130 | os2/gengradd.dll=./os2/Bin/gengradd.dll \
|
---|
131 | os2/libc063.dll=./os2/Bin/libc063.dll \
|
---|
132 | os2/readme.txt=./os2/Bin/readme.txt \
|
---|
133 | os2/vboxmouse.sys=./os2/Bin/vboxmouse.sys
|
---|
134 | endif
|
---|
135 |
|
---|
136 | #
|
---|
137 | # The x86 Linux .iso file spec.
|
---|
138 | #
|
---|
139 | ifdef VBOX_WITH_ADDITIONS_ISO.linux.x86
|
---|
140 | VBOX_PATH_ADDITIONS.linux.x86 = $(PATH_OUT_BASE)/linux.x86/$(BUILD_TYPE)/bin/additions
|
---|
141 | GUESTADDITIONS_FILESPEC.linux.x86 = \
|
---|
142 | VBoxLinuxAdditions.run=$(VBOX_PATH_ADDITIONS.linux.x86)/VBoxLinuxAdditions.run
|
---|
143 | endif
|
---|
144 |
|
---|
145 |
|
---|
146 | #
|
---|
147 | # Build the Guest Additions ISO image.
|
---|
148 | #
|
---|
149 | ifndef VBOX_WITHOUT_ADDITIONS_ISO
|
---|
150 | $(VBOX_PATH_ADDITIONS)/VBoxGuestAdditions.iso: \
|
---|
151 | $(filter-out %=deleteme=,\
|
---|
152 | $(subst =,=deleteme= ,\
|
---|
153 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
154 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
155 | $(GUESTADDITIONS_FILESPEC.os2.x86) \
|
---|
156 | )\
|
---|
157 | ) \
|
---|
158 | $(VBOX_SVN_REV_KMK) \
|
---|
159 | Makefile.kmk
|
---|
160 | $(call MSG_TOOL,mkisofs,,$@)
|
---|
161 | $(QUIET)$(MKDIR) -p $(@D)
|
---|
162 | $(VBOX_MKISOFS) -rational-rock -joliet -iso-level 4 \
|
---|
163 | -volid "VBOXADDITIONS_$(VBOX_VERSION_STRING)_$(VBOX_SVN_REV)" -l -graft-points -o $@ \
|
---|
164 | $(GUESTADDITIONS_FILESPEC.win.x86) \
|
---|
165 | $(GUESTADDITIONS_FILESPEC.linux.x86) \
|
---|
166 | $(GUESTADDITIONS_FILESPEC.os2.x86)
|
---|
167 | endif
|
---|
168 |
|
---|
169 |
|
---|