1 | # $Id: Makefile.kmk 69111 2017-10-17 14:26:02Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Top-level makefile for the VBox Host drivers.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2017 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 |
|
---|
18 | SUB_DEPTH = ../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | # Include sub-makefiles.
|
---|
22 | include $(PATH_SUB_CURRENT)/Support/Makefile.kmk
|
---|
23 |
|
---|
24 | if !defined(VBOX_ONLY_DOCS) \
|
---|
25 | && !defined(VBOX_ONLY_EXTPACKS) \
|
---|
26 | && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
27 | if1of ($(KBUILD_TARGET),win)
|
---|
28 | include $(PATH_SUB_CURRENT)/win/Makefile.kmk
|
---|
29 | endif
|
---|
30 | ifdef VBOX_WITH_USB
|
---|
31 | include $(PATH_SUB_CURRENT)/VBoxUSB/Makefile.kmk
|
---|
32 | endif
|
---|
33 | if1of ($(KBUILD_TARGET), darwin solaris win linux freebsd)
|
---|
34 | ifdef VBOX_WITH_NETFLT
|
---|
35 | include $(PATH_SUB_CURRENT)/VBoxNetFlt/Makefile.kmk
|
---|
36 | endif
|
---|
37 | endif
|
---|
38 | if1of ($(KBUILD_TARGET), darwin solaris win linux freebsd)
|
---|
39 | ifdef VBOX_WITH_NETADP
|
---|
40 | include $(PATH_SUB_CURRENT)/VBoxNetAdp/Makefile.kmk
|
---|
41 | endif
|
---|
42 | endif
|
---|
43 | if1of ($(KBUILD_TARGET), darwin freebsd linux solaris)
|
---|
44 | include $(PATH_SUB_CURRENT)/adpctl/Makefile.kmk
|
---|
45 | endif
|
---|
46 | if1of ($(KBUILD_TARGET), darwin freebsd linux)
|
---|
47 | include $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/Makefile.kmk
|
---|
48 | endif
|
---|
49 |
|
---|
50 | if1of ($(KBUILD_TARGET), linux)
|
---|
51 | ifdef VBOX_WITH_PCI_PASSTHROUGH
|
---|
52 | include $(PATH_SUB_CURRENT)/VBoxPci/Makefile.kmk
|
---|
53 | endif
|
---|
54 | endif
|
---|
55 |
|
---|
56 | endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
57 |
|
---|
58 |
|
---|
59 | #
|
---|
60 | # Build test for the linux host kernel modules.
|
---|
61 | #
|
---|
62 | if defined(VBOX_WITH_TESTCASES) \
|
---|
63 | && !defined(VBOX_ONLY_SDK) \
|
---|
64 | && !defined(VBOX_ONLY_DOCS) \
|
---|
65 | && !defined(VBOX_ONLY_VALIDATIONKIT) \
|
---|
66 | && !defined(VBOX_WITHOUT_LINUX_TEST_BUILDS) \
|
---|
67 | && "$(KBUILD_TARGET)" == "linux" \
|
---|
68 | && "$(KBUILD_HOST_ARCH)" == "$(KBUILD_TARGET_ARCH)"
|
---|
69 | VBOX_LNX_MOD_TEST = $(PATH_TARGET)/tsthost_mod
|
---|
70 | VBOX_LNX_MOD_TEST_TARGET = $(PATH_TARGET)/tsthost_mod.run
|
---|
71 | TESTING += $(VBOX_LNX_MOD_TEST_TARGET)
|
---|
72 | OTHERS += $(VBOX_LNX_MOD_TEST_TARGET)
|
---|
73 | OTHER_CLEAN += $(VBOX_LNX_MOD_TEST_TARGET)
|
---|
74 | $$(VBOX_LNX_MOD_TEST_TARGET): \
|
---|
75 | $$(vboxdrv-mod_2_STAGE_TARGETS) \
|
---|
76 | $$(VBoxNetFlt-src_2_STAGE_TARGETS) \
|
---|
77 | $$(VBoxNetAdp-src_2_STAGE_TARGETS) \
|
---|
78 | $$(VBoxPci-src_2_STAGE_TARGETS) \
|
---|
79 | $$(HostDrivers-scripts_2_STAGE_TARGETS)
|
---|
80 | $(QUIET)$(call MSG_L1,Doing a test build of the host kernel modules)
|
---|
81 | $(QUIET)$(RM) -f -- "$@"
|
---|
82 | $(QUIET)$(RM) -Rf -- "$(VBOX_LNX_MOD_TEST)"
|
---|
83 | $(QUIET)$(MKDIR) -p -- "$(VBOX_LNX_MOD_TEST)"
|
---|
84 | $(QUIET)$(CP) -R -- "$(PATH_STAGE_BIN)/src/" "$(VBOX_LNX_MOD_TEST)/"
|
---|
85 | + $(QUIET)make -C $(VBOX_LNX_MOD_TEST) clean
|
---|
86 | + $(QUIET)make -C $(VBOX_LNX_MOD_TEST)
|
---|
87 | $(QUIET)$(RM) -Rf -- $(VBOX_LNX_MOD_TEST)
|
---|
88 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
89 |
|
---|
90 | endif
|
---|
91 |
|
---|
92 |
|
---|
93 | # Let kBuild generate the rules.
|
---|
94 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
95 |
|
---|