1 | # $Id: Makefile.kmk 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Darwin VBoxUSB kernel extension.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2019 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 | # VBoxUSB.kext - The Darwin Kernel Extension.
|
---|
32 | #
|
---|
33 |
|
---|
34 | # Leopard (x86) and Snow Leopard (x86/amd64)
|
---|
35 | SYSMODS.darwin += VBoxUSB
|
---|
36 | VBoxUSB_TEMPLATE = VBOXR0DRV
|
---|
37 | VBoxUSB_INST = $(INST_VBOXUSB)Contents/MacOS/
|
---|
38 | VBoxUSB_DEBUG_INST.darwin = $(patsubst %/,%,$(INST_VBOXUSB))
|
---|
39 | VBoxUSB_INCS = \
|
---|
40 | . \
|
---|
41 | ..
|
---|
42 | #VBoxUSB_LDFLAGS = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
43 | VBoxUSB_SOURCES := \
|
---|
44 | VBoxUSB.cpp \
|
---|
45 | ../USBFilter.cpp \
|
---|
46 | ../VBoxUSBFilterMgr.cpp
|
---|
47 |
|
---|
48 | INSTALLS += VBoxUSB.kext
|
---|
49 | VBoxUSB.kext_INST = $(INST_VBOXUSB)Contents/
|
---|
50 | VBoxUSB.kext_SOURCES = $(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist
|
---|
51 | VBoxUSB.kext_CLEAN = $(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist
|
---|
52 | VBoxUSB.kext_BLDDIRS = $(VBoxUSB.kext_0_OUTDIR)/Contents/
|
---|
53 |
|
---|
54 | $$(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist: $(PATH_SUB_CURRENT)/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
55 | $(call MSG_GENERATE,VBoxUSB,$@,$<)
|
---|
56 | $(QUIET)$(RM) -f $@
|
---|
57 | $(QUIET)$(SED) \
|
---|
58 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
59 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
60 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
61 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
62 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
63 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
64 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
65 | --output $@ \
|
---|
66 | $<
|
---|
67 |
|
---|
68 | $(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxUSB)
|
---|
69 |
|
---|
70 | # Common manual loader script.
|
---|
71 | INSTALLS += ScriptsUSB
|
---|
72 | ScriptsUSB_INST = $(INST_DIST)
|
---|
73 | ScriptsUSB_EXEC_SOURCES = \
|
---|
74 | loadusb.sh
|
---|
75 |
|
---|
76 | ifdef VBOX_WITH_TESTCASES
|
---|
77 | #
|
---|
78 | # Testcase for doing some manual driver testing...
|
---|
79 | #
|
---|
80 | PROGRAMS += tstOpenUSBDev
|
---|
81 | tstOpenUSBDev_TEMPLATE = VBOXR3TSTEXE
|
---|
82 | tstOpenUSBDev_SOURCES = testcase/tstOpenUSBDev.cpp
|
---|
83 | tstOpenUSBDev_LDFLAGS = -framework CoreFoundation -framework IOKit
|
---|
84 | endif
|
---|
85 |
|
---|
86 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
87 |
|
---|