VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxUSB/darwin/Makefile.kmk@ 88977

Last change on this file since 88977 was 87259, checked in by vboxsync, 4 years ago

VBoxUSB: Adjustments for bugref:9898.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# $Id: Makefile.kmk 87259 2021-01-15 11:10:47Z vboxsync $
2## @file
3# Sub-Makefile for the Darwin VBoxUSB kernel extension.
4#
5
6#
7# Copyright (C) 2006-2020 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
27SUB_DEPTH = ../../../../..
28include $(KBUILD_PATH)/subheader.kmk
29ifn1of ($(KBUILD_TARGET_ARCH), arm64)
30
31#
32# VBoxUSB.kext - The Darwin Kernel Extension.
33#
34
35# Leopard (x86) and Snow Leopard (x86/amd64)
36SYSMODS.darwin += VBoxUSB
37VBoxUSB_TEMPLATE := VBOXR0DRV
38ifdef KMK_WITH_VERSION_COMPARE ## @todo @bugref{9790}: Remove after updating kmk.
39if "$(VBOX_DEF_MACOSX_VERSION_MIN)" vge "10.11" # The IOUSBDevice.h header was removed in 10.11.
40VBoxUSB_TEMPLATE := VBoxR0DrvOSX10.10
41endif
42endif ## @todo @bugref{9790}: Remove after updating kmk.
43VBoxUSB_INST = $(INST_VBOXUSB)Contents/MacOS/
44VBoxUSB_DEBUG_INST.darwin = $(patsubst %/,%,$(INST_VBOXUSB))
45VBoxUSB_INCS = \
46 . \
47 ..
48#VBoxUSB_LDFLAGS = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
49VBoxUSB_SOURCES := \
50 VBoxUSB.cpp \
51 ../USBFilter.cpp \
52 ../VBoxUSBFilterMgr.cpp
53
54INSTALLS += VBoxUSB.kext
55VBoxUSB.kext_INST = $(INST_VBOXUSB)Contents/
56VBoxUSB.kext_SOURCES = $(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist
57VBoxUSB.kext_CLEAN = $(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist
58VBoxUSB.kext_BLDDIRS = $(VBoxUSB.kext_0_OUTDIR)/Contents/
59
60$$(VBoxUSB.kext_0_OUTDIR)/Contents/Info.plist: $(PATH_SUB_CURRENT)/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
61 $(call MSG_GENERATE,VBoxUSB,$@,$<)
62 $(QUIET)$(RM) -f $@
63 $(QUIET)$(SED) \
64 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
65 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
66 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
67 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
68 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
69 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
70 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
71 --output $@ \
72 $<
73
74$(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxUSB)
75
76# Common manual loader script.
77INSTALLS += ScriptsUSB
78ScriptsUSB_INST = $(INST_DIST)
79ScriptsUSB_EXEC_SOURCES = \
80 loadusb.sh
81
82ifdef VBOX_WITH_TESTCASES
83#
84# Testcase for doing some manual driver testing...
85#
86PROGRAMS += tstOpenUSBDev
87tstOpenUSBDev_TEMPLATE = VBOXR3TSTEXE
88tstOpenUSBDev_SOURCES = testcase/tstOpenUSBDev.cpp
89tstOpenUSBDev_LDFLAGS = -framework CoreFoundation -framework IOKit
90endif
91
92endif # ! arm64
93include $(FILE_KBUILD_SUB_FOOTER)
94
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette