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