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