1 | # $Id: Makefile.kmk 27036 2010-03-04 14:41:05Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the support library and the drivers/modules/kexts it uses.
|
---|
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 | # The contents of this file may alternatively be used under the terms
|
---|
18 | # of the Common Development and Distribution License Version 1.0
|
---|
19 | # (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | # VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | # CDDL are applicable instead of those of the GPL.
|
---|
22 | #
|
---|
23 | # You may elect to license modified versions of this file under the
|
---|
24 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | #
|
---|
26 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
27 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
28 | # additional information or have any questions.
|
---|
29 | #
|
---|
30 |
|
---|
31 | SUB_DEPTH = ../../../..
|
---|
32 | include $(KBUILD_PATH)/subheader.kmk
|
---|
33 |
|
---|
34 | #
|
---|
35 | # Targets
|
---|
36 | #
|
---|
37 | LIBRARIES += SUPR3 SUPR3Static SUPR3HardenedStatic
|
---|
38 | ifndef VBOX_ONLY_DOCS
|
---|
39 | if1of ($(VBOX_LDR_FMT), pe lx)
|
---|
40 | LIBRARIES += SUPR0
|
---|
41 | endif
|
---|
42 | endif
|
---|
43 | if !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
|
---|
44 | ifdef VBOX_WITH_SUPSVC
|
---|
45 | PROGRAMS += VBoxSupSvc
|
---|
46 | endif
|
---|
47 | ifdef VBOX_WITH_VBOXDRV
|
---|
48 | LIBRARIES += SUPR0IdcClient
|
---|
49 | SYSMODS.freebsd += vboxdrv
|
---|
50 | SYSMODS.linux += vboxdrv
|
---|
51 | SYSMODS.win += VBoxDrv
|
---|
52 | SYSMODS.os2 += VBoxDrv
|
---|
53 | SYSMODS.solaris += vboxdrv
|
---|
54 | endif
|
---|
55 | INSTALLS.linux += vboxdrv-mod vboxdrv-sh
|
---|
56 | INSTALLS.freebsd += vboxdrv-mod vboxdrv-sh
|
---|
57 |
|
---|
58 | #
|
---|
59 | # Include sub-makefile(s).
|
---|
60 | #
|
---|
61 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
62 |
|
---|
63 | #
|
---|
64 | # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
|
---|
65 | #
|
---|
66 | ifeq ($(KBUILD_TARGET),linux)
|
---|
67 | include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
|
---|
68 | endif
|
---|
69 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
70 | include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
|
---|
71 | endif
|
---|
72 | endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
|
---|
73 |
|
---|
74 |
|
---|
75 | #
|
---|
76 | # The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
|
---|
77 | #
|
---|
78 | ifneq ($(filter l4%,$(KBUILD_TARGET) $(BUILD_TARGET_SUB)),)
|
---|
79 | # L4 has trouble with -pedantic. It also make trouble when inlining is not enabled.
|
---|
80 | SUPR3_TEMPLATE = VBOXR3NP
|
---|
81 | else
|
---|
82 | SUPR3_TEMPLATE = VBOXR3
|
---|
83 | endif
|
---|
84 | SUPR3_DEFS = \
|
---|
85 | IN_SUP_R3 IN_RT_R3 \
|
---|
86 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
|
---|
87 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
|
---|
88 | SUPR3_INCS := $(PATH_SUB_CURRENT)
|
---|
89 | SUPR3_INCS.l4 = $(L4_INCDIR)
|
---|
90 | SUPR3_SOURCES = \
|
---|
91 | SUPLib.cpp \
|
---|
92 | SUPLibSem.cpp \
|
---|
93 | SUPR3HardenedIPRT.cpp \
|
---|
94 | SUPR3HardenedVerify.cpp \
|
---|
95 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
|
---|
96 |
|
---|
97 | #
|
---|
98 | # Static version of SUPR3.
|
---|
99 | #
|
---|
100 | SUPR3Static_TEMPLATE = VBOXR3STATIC
|
---|
101 | SUPR3Static_EXTENDS = SUPR3
|
---|
102 |
|
---|
103 | #
|
---|
104 | # The static part of the hardened support library (ring-3).
|
---|
105 | #
|
---|
106 | SUPR3HardenedStatic_TEMPLATE = VBOXR3HARDENEDLIB
|
---|
107 | SUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
|
---|
108 | SUPR3HardenedStatic_DEFS += \
|
---|
109 | $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
|
---|
110 | $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
|
---|
111 | SUPR3HardenedStatic_INCS = .
|
---|
112 | SUPR3HardenedStatic_SOURCES = \
|
---|
113 | SUPR3HardenedMain.cpp \
|
---|
114 | SUPR3HardenedVerify.cpp \
|
---|
115 | $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
|
---|
116 |
|
---|
117 | #
|
---|
118 | # VBoxSupSvc - The system wide service/daemon.
|
---|
119 | #
|
---|
120 | VBoxSupSvc_TEMPLATE = VBOXR3EXE
|
---|
121 | VBoxSupSvc_SOURCES = \
|
---|
122 | SUPSvc.cpp \
|
---|
123 | SUPSvcGlobal.cpp \
|
---|
124 | $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
|
---|
125 | if1of ($(KBUILD_TARGET), win)
|
---|
126 | VBoxSupSvc_SOURCES += \
|
---|
127 | SUPSvcGrant.cpp
|
---|
128 | endif
|
---|
129 | ifn1of ($(KBUILD_TARGET), win)
|
---|
130 | VBoxSupSvc_SOURCES += \
|
---|
131 | SUPSvcMain-posix.cpp
|
---|
132 | endif
|
---|
133 | VBoxSupSvc_LIBS = \
|
---|
134 | $(LIB_RUNTIME)
|
---|
135 |
|
---|
136 |
|
---|
137 | #
|
---|
138 | # SUPR0 - The Ring-0 Import / Thunk library.
|
---|
139 | #
|
---|
140 | SUPR0_TEMPLATE = VBoxR0
|
---|
141 | ifeq ($(VBOX_LDR_FMT),pe)
|
---|
142 | SUPR0_SOURCES += SUPR0.def
|
---|
143 | endif
|
---|
144 | ifeq ($(VBOX_LDR_FMT),lx)
|
---|
145 | SUPR0_SOURCES += $$(PATH_SUPR0)/SUPR0.def
|
---|
146 | $$(PATH_SUPR0)/SUPR0.def: $(PATH_SUB_CURRENT)/SUPR0.def | $$(dir $$@)
|
---|
147 | $(SED) \
|
---|
148 | -e 's/^[ \t][ \t]*\([gA-Z]\)/ _\1/' \
|
---|
149 | -e 's/[ \t]DATA[ \t]*/ /' \
|
---|
150 | -e 's/g_pSUPGlobalInfoPage/g_SUPGlobalInfoPage/' \
|
---|
151 | --output [email protected]\
|
---|
152 | $<
|
---|
153 | $(MV) -f [email protected] $@
|
---|
154 | endif
|
---|
155 |
|
---|
156 |
|
---|
157 | #
|
---|
158 | # SUPR0IdcClient - The Ring-0 IDC client driver library.
|
---|
159 | #
|
---|
160 | SUPR0IdcClient_TEMPLATE = VBOXR0DRV
|
---|
161 | SUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
|
---|
162 | SUPR0IdcClient_SDKS.win = W2K3DDK WINPSDKINCS
|
---|
163 | SUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
|
---|
164 | $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
|
---|
165 | SUPR0IdcClient_SOURCES = \
|
---|
166 | SUPR0IdcClient.c \
|
---|
167 | SUPR0IdcClientComponent.c \
|
---|
168 | SUPR0IdcClientStubs.c
|
---|
169 |
|
---|
170 |
|
---|
171 | if !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
|
---|
172 |
|
---|
173 | #
|
---|
174 | # VBoxDrv.sys - The Windows driver.
|
---|
175 | #
|
---|
176 | ## @todo consoliate all the targets into a single mess.
|
---|
177 | ifeq ($(KBUILD_TARGET),win)
|
---|
178 | VBoxDrv_TEMPLATE = VBOXR0DRV
|
---|
179 | ifdef VBOX_SIGNING_MODE
|
---|
180 | VBoxDrv_NOINST = true
|
---|
181 | endif
|
---|
182 | VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER
|
---|
183 | ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
184 | VBoxDrv_DEFS += VBOX_WITHOUT_NATIVE_R0_LOADER
|
---|
185 | endif
|
---|
186 | ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
|
---|
187 | VBoxDrv_DEFS += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
|
---|
188 | endif
|
---|
189 | VBoxDrv_SDKS = W2K3DDK WINPSDKINCS
|
---|
190 | VBoxDrv_INCS := $(PATH_SUB_CURRENT)
|
---|
191 | VBoxDrv_SOURCES = \
|
---|
192 | win/SUPDrv-win.cpp \
|
---|
193 | win/SUPDrvA-win.asm \
|
---|
194 | SUPDrv.c \
|
---|
195 | SUPDrvSem.c \
|
---|
196 | win/VBoxDrv.rc
|
---|
197 | VBoxDrv_LDFLAGS.x86 = -Entry:DriverEntry@8
|
---|
198 | VBoxDrv_LDFLAGS.amd64 = -Entry:DriverEntry
|
---|
199 | VBoxDrv_LIBS = \
|
---|
200 | $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
|
---|
201 | $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
|
---|
202 | $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
203 |
|
---|
204 |
|
---|
205 | INSTALLS += VBoxDrv-inf
|
---|
206 | VBoxDrv-inf_INST = $(INST_BIN)
|
---|
207 | VBoxDrv-inf_MODE = a+r,u+w
|
---|
208 | VBoxDrv-inf_SOURCES = \
|
---|
209 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf
|
---|
210 | VBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
|
---|
211 | VBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
|
---|
212 |
|
---|
213 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(call DIRDEP,$$(@D))
|
---|
214 | $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
|
---|
215 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
216 |
|
---|
217 | ifdef VBOX_SIGNING_MODE
|
---|
218 | VBoxDrv-inf_SOURCES += \
|
---|
219 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys \
|
---|
220 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
|
---|
221 |
|
---|
222 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(TARGET_VBoxDrv) | $$(call DIRDEP,$$(@D))
|
---|
223 | $(INSTALL) -m 644 $< $(@D)
|
---|
224 |
|
---|
225 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat: \
|
---|
226 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf \
|
---|
227 | $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys
|
---|
228 | $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
|
---|
229 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
230 | endif # signing
|
---|
231 | endif # win
|
---|
232 |
|
---|
233 |
|
---|
234 | #
|
---|
235 | # vboxdrv.ko - The Linux Kernel Module (syntax check only).
|
---|
236 | #
|
---|
237 | ifeq ($(KBUILD_TARGET),linux)
|
---|
238 | vboxdrv_TEMPLATE = VBOXR0DRV
|
---|
239 | vboxdrv_NOINST = true
|
---|
240 | vboxdrv_DEFS = KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE IN_RT_R0 IN_SUP_R0 CONFIG_VBOXDRV_AS_MISC
|
---|
241 | ifdef VBOX_LINUX_VERSION_2_4
|
---|
242 | vboxdrv_DEFS += EXPORT_SYMTAB
|
---|
243 | endif
|
---|
244 | vboxdrv_INCS := \
|
---|
245 | $(PATH_SUB_CURRENT) \
|
---|
246 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
247 | vboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
248 | vboxdrv_LIBS.debug = $(vboxdrv_LIBS) $(VBOX_GCC_LIBGCC)
|
---|
249 | vboxdrv_SOURCES = \
|
---|
250 | $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
|
---|
251 | SUPDrv.c \
|
---|
252 | SUPDrvSem.c
|
---|
253 | ifndef VBOX_LINUX_VERSION_2_4
|
---|
254 | vboxdrv_SOURCES += \
|
---|
255 | $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).mod.c
|
---|
256 | endif
|
---|
257 |
|
---|
258 |
|
---|
259 | #
|
---|
260 | # Targets for installing the linux sources.
|
---|
261 | #
|
---|
262 | vboxdrv-mod_INST = bin/src/vboxdrv/
|
---|
263 | vboxdrv-mod_MODE = a+r,u+w
|
---|
264 | vboxdrv-mod_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #"
|
---|
265 | vboxdrv-mod_SOURCES += \
|
---|
266 | $(if $(VBOX_OSE),,\
|
---|
267 | $(PATH_vboxdrv-mod)/dkms.conf) \
|
---|
268 | $(PATH_vboxdrv-mod)/Makefile
|
---|
269 | vboxdrv-mod_CLEAN = \
|
---|
270 | $(PATH_vboxdrv-mod)/dkms.conf \
|
---|
271 | $(PATH_vboxdrv-mod)/Makefile
|
---|
272 |
|
---|
273 | vboxdrv-sh_INST = bin/src/vboxdrv
|
---|
274 | vboxdrv-sh_MODE = a+rx,u+w
|
---|
275 | vboxdrv-sh_SOURCES = $(subst ",,$(FILES_VBOXDRV_BIN)) #"
|
---|
276 | vboxdrv-sh_SOURCES += \
|
---|
277 | $(PATH_vboxdrv-sh)/build_in_tmp \
|
---|
278 | $(if $(VBOX_OSE),,\
|
---|
279 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
|
---|
280 | vboxdrv-sh_CLEAN = \
|
---|
281 | $(PATH_TARGET)/vboxdrv-sh-1.dep \
|
---|
282 | $(PATH_vboxdrv-sh)/build_in_tmp
|
---|
283 |
|
---|
284 |
|
---|
285 | # Scripts needed for building the kernel modules
|
---|
286 |
|
---|
287 | $$(PATH_vboxdrv-sh)/build_in_tmp: \
|
---|
288 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
|
---|
289 | $(VBOX_VERSION_STAMP) \
|
---|
290 | | $$(dir $$@)
|
---|
291 | $(call MSG_TOOL,Creating,,$@)
|
---|
292 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxdrv;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
|
---|
293 | $(QUIET)chmod 0755 $@
|
---|
294 |
|
---|
295 | $$(PATH_vboxdrv-mod)/dkms.conf: \
|
---|
296 | $(PATH_SUB_CURRENT)/linux/dkms.conf \
|
---|
297 | $(VBOX_VERSION_STAMP) \
|
---|
298 | | $$(dir $$@)
|
---|
299 | $(call MSG_TOOL,Creating,,$@)
|
---|
300 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
|
---|
301 |
|
---|
302 | includedep $(PATH_TARGET)/vboxdrv-sh-1.dep
|
---|
303 | $$(PATH_vboxdrv-mod)/Makefile: \
|
---|
304 | $(PATH_SUB_CURRENT)/linux/Makefile \
|
---|
305 | $$(if $$(eq $$(Support/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
306 | | $$(dir $$@)
|
---|
307 | $(call MSG_TOOL,Creating,,$@)
|
---|
308 | ifndef VBOX_WITH_HARDENING
|
---|
309 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
310 | else
|
---|
311 | $(QUIET)$(CP) -f $< $@
|
---|
312 | endif
|
---|
313 | %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/vboxdrv-sh-1.dep
|
---|
314 | %$(QUIET2)$(APPEND) '$(PATH_TARGET)/vboxdrv-sh-1.dep' 'Support/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
315 |
|
---|
316 | endif # real linux
|
---|
317 |
|
---|
318 |
|
---|
319 |
|
---|
320 |
|
---|
321 | #
|
---|
322 | # VBoxDrv.kext - The Darwin Kernel Extension.
|
---|
323 | #
|
---|
324 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
325 | # The Tiger variant.
|
---|
326 | SYSMODS.x86 += VBoxDrvTiger
|
---|
327 | VBoxDrvTiger_TEMPLATE = VBOXR0DRV
|
---|
328 | VBoxDrvTiger_INST = $(INST_VBOXDRV_TIGER)Contents/MacOS/
|
---|
329 | VBoxDrvTiger_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
330 | VBoxDrvTiger_DEFS.debug += DEBUG_DARWIN_GIP
|
---|
331 | VBoxDrvTiger_INCS = .
|
---|
332 | VBoxDrvTiger_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
333 | #VBoxDrvTiger_LDFLAGS = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
334 | VBoxDrvTiger_SOURCES = \
|
---|
335 | SUPDrv.c \
|
---|
336 | SUPDrvSem.c \
|
---|
337 | $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).cpp
|
---|
338 |
|
---|
339 | INSTALLS += VBoxDrvTiger.kext
|
---|
340 | VBoxDrvTiger.kext_INST = $(INST_VBOXDRV_TIGER)Contents/
|
---|
341 | VBoxDrvTiger.kext_SOURCES = $(PATH_VBoxDrvTiger.kext)/Info.plist
|
---|
342 | VBoxDrvTiger.kext_CLEAN = $(PATH_VBoxDrvTiger.kext)/Info.plist
|
---|
343 |
|
---|
344 | $$(PATH_VBoxDrvTiger.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info-Tiger.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
345 | $(call MSG_GENERATE,VBoxDrvTiger,$@,$<)
|
---|
346 | $(QUIET)$(RM) -f $@
|
---|
347 | $(QUIET)$(SED) \
|
---|
348 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
349 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
350 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
351 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
352 | --output $@ \
|
---|
353 | $<
|
---|
354 |
|
---|
355 | # The Leopard variant.
|
---|
356 | SYSMODS += VBoxDrv
|
---|
357 | VBoxDrv_EXTENDS = VBoxDrvTiger
|
---|
358 | VBoxDrv_EXTENDS_BY = appending
|
---|
359 | VBoxDrv_TEMPLATE = VBOXR0DRV$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",OSX105,)
|
---|
360 | VBoxDrv_INST = $(INST_VBOXDRV)Contents/MacOS/
|
---|
361 | VBoxDrv_DEFS = VBOX_WITH_HOST_VMX
|
---|
362 |
|
---|
363 | INSTALLS += VBoxDrv.kext
|
---|
364 | VBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
|
---|
365 | VBoxDrv.kext_SOURCES = $(PATH_VBoxDrv.kext)/Info.plist
|
---|
366 | VBoxDrv.kext_CLEAN = $(PATH_VBoxDrv.kext)/Info.plist
|
---|
367 |
|
---|
368 | $$(PATH_VBoxDrv.kext)/Info.plist: \
|
---|
369 | $(PATH_SUB_CURRENT)/darwin/Info.plist \
|
---|
370 | $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
371 | $(call MSG_GENERATE,VBoxDrv,$@,$<)
|
---|
372 | $(QUIET)$(RM) -f $@
|
---|
373 | $(QUIET)$(SED) \
|
---|
374 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
375 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
376 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
377 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
378 | --output $@ \
|
---|
379 | $<
|
---|
380 |
|
---|
381 | # Common manual loader script.
|
---|
382 | INSTALLS += Scripts
|
---|
383 | Scripts_INST = $(INST_DIST)
|
---|
384 | Scripts_SOURCES = \
|
---|
385 | darwin/load.sh
|
---|
386 |
|
---|
387 | endif # darwin
|
---|
388 | ifeq ($(KBUILD_TARGET),os2)
|
---|
389 |
|
---|
390 | #
|
---|
391 | # VBoxDrv.sys - The OS/2 driver.
|
---|
392 | #
|
---|
393 | VBoxDrv_TEMPLATE = VBOXR0DRV
|
---|
394 | VBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
395 | VBoxDrv_INCS := $(PATH_SUB_CURRENT)
|
---|
396 | #VBoxDrv_LDFLAGS = -s -t -v
|
---|
397 | VBoxDrv_SOURCES = \
|
---|
398 | os2/SUPDrvA-os2.asm \
|
---|
399 | os2/SUPDrv-os2.def
|
---|
400 | VBoxDrv_LIBS = \
|
---|
401 | $(TARGET_VBoxDrvLib) \
|
---|
402 | $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
|
---|
403 | $(VBOX_GCC_LIBGCC) \
|
---|
404 | end
|
---|
405 |
|
---|
406 | # temp hack to ensure that SUPDrvA-os2.asm is first in the link.
|
---|
407 | LIBRARIES += VBoxDrvLib
|
---|
408 | VBoxDrvLib_TEMPLATE = VBOXR0DRV
|
---|
409 | VBoxDrvLib_NOINST = 1
|
---|
410 | VBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
|
---|
411 | VBoxDrvLib_INCS := \
|
---|
412 | . \
|
---|
413 | $(PATH_ROOT)/src/VBox/Runtime/include
|
---|
414 | VBoxDrvLib_SOURCES = \
|
---|
415 | os2/SUPDrv-os2.cpp \
|
---|
416 | SUPDrv.c \
|
---|
417 | SUPDrvSem.c
|
---|
418 |
|
---|
419 | endif # os2
|
---|
420 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
421 |
|
---|
422 | #
|
---|
423 | # vboxdrv.ko - The FreeBSD Kernel Module.
|
---|
424 | #
|
---|
425 | vboxdrv_TEMPLATE = VBOXR0DRV
|
---|
426 | vboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
427 | vboxdrv_INCS := $(PATH_SUB_CURRENT)
|
---|
428 | vboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
429 | vboxdrv_SOURCES := \
|
---|
430 | $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
|
---|
431 | $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).def \
|
---|
432 | SUPDrv.c \
|
---|
433 | SUPDrvSem.c
|
---|
434 | ## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
|
---|
435 |
|
---|
436 | #
|
---|
437 | # Targets for installing the freebsd sources.
|
---|
438 | #
|
---|
439 | vboxdrv-mod_INST = bin/src/vboxdrv/
|
---|
440 | vboxdrv-mod_MODE = a+r,u+w
|
---|
441 | vboxdrv-mod_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #"
|
---|
442 | vboxdrv-mod_SOURCES += \
|
---|
443 | $(PATH_vboxdrv-mod)/Makefile
|
---|
444 | vboxdrv-mod_CLEAN = \
|
---|
445 | $(PATH_vboxdrv-mod)/Makefile
|
---|
446 |
|
---|
447 | $$(PATH_vboxdrv-mod)/Makefile: \
|
---|
448 | $(PATH_SUB_CURRENT)/freebsd/Makefile \
|
---|
449 | $$(if $$(eq $$(Support/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
450 | | $$(dir $$@)
|
---|
451 | $(call MSG_TOOL,Creating,,$@)
|
---|
452 | ifndef VBOX_WITH_HARDENING
|
---|
453 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
454 | else
|
---|
455 | $(QUIET)$(CP) -f $< $@
|
---|
456 | endif
|
---|
457 |
|
---|
458 | endif # freebsd
|
---|
459 | ifeq ($(KBUILD_TARGET),solaris)
|
---|
460 |
|
---|
461 | #
|
---|
462 | # vboxdrv.o - The Solaris Kernel Module.
|
---|
463 | #
|
---|
464 | vboxdrv_TEMPLATE = VBOXR0DRV
|
---|
465 | vboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER
|
---|
466 | ifdef VBOX_WITH_NETFLT
|
---|
467 | vboxdrv_DEFS += VBOX_WITH_NETFLT
|
---|
468 | endif
|
---|
469 | vboxdrv_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
470 | vboxdrv_DEPS += $(VBOX_SVN_REV_KMK)
|
---|
471 | vboxdrv_INCS := $(PATH_SUB_CURRENT)
|
---|
472 | vboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
473 | vboxdrv_SOURCES = \
|
---|
474 | $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
|
---|
475 | SUPDrv.c \
|
---|
476 | SUPDrvSem.c
|
---|
477 |
|
---|
478 | endif # solaris
|
---|
479 |
|
---|
480 | #
|
---|
481 | # SUPDrv.c needs the VBOX_SVN_REV.
|
---|
482 | #
|
---|
483 | SUPDrv.c_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
484 |
|
---|
485 |
|
---|
486 | endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
|
---|
487 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
488 |
|
---|