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