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