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