1 | SUB_DEPTH = ../../../..
|
---|
2 | include $(KBUILD_PATH)/subheader.kmk
|
---|
3 |
|
---|
4 | ifeq (1,1)
|
---|
5 |
|
---|
6 | if1of ($(KBUILD_TARGET), linux)
|
---|
7 |
|
---|
8 | SYSMODS += VBoxPci
|
---|
9 | VBoxPci_TEMPLATE = VBOXR0DRV
|
---|
10 | VBoxPci_INST = $(INST_VBOXPCI)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
|
---|
11 | VBoxPci_NAME.linux = vboxpci
|
---|
12 | VBoxPci_NOINST.linux = true
|
---|
13 | VBoxPci_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
|
---|
14 | VBoxPci_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxpci\) KBUILD_BASENAME=KBUILD_STR\(vboxpci\) MODULE
|
---|
15 | VBoxPci_INCS.linux := \
|
---|
16 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
17 | VBoxPci_INCS = \
|
---|
18 | .
|
---|
19 | VBoxPci_SOURCES.linux = \
|
---|
20 | linux/VBoxPci-linux.c \
|
---|
21 | VBoxPci.c
|
---|
22 | VBoxPci_SOURCES =
|
---|
23 | VBoxPci_LIBS += \
|
---|
24 | $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
25 |
|
---|
26 | endif
|
---|
27 |
|
---|
28 |
|
---|
29 | ifeq ($(KBUILD_TARGET),linux)
|
---|
30 |
|
---|
31 | include $(PATH_SUB_CURRENT)/linux/files_vboxpci
|
---|
32 |
|
---|
33 | INSTALLS += VBoxPci-src VBoxPci-sh
|
---|
34 |
|
---|
35 | VBoxPci-src_INST = bin/src/vboxpci/
|
---|
36 | VBoxPci-src_MODE = a+r,u+w
|
---|
37 | VBoxPci-src_SOURCES = $(subst ",,$(VBOX_VBOXPCI_SOURCES)) #"
|
---|
38 | VBoxPci-src_SOURCES+= \
|
---|
39 | $(VBoxPci-src_0_OUTDIR)/Makefile
|
---|
40 | VBoxPci-src_CLEAN = \
|
---|
41 | $(VBoxPci-src_0_OUTDIR)/Makefile \
|
---|
42 | $(PATH_TARGET)/VBoxPciSrc-src-1.dep
|
---|
43 |
|
---|
44 | VBoxPci-sh_INST = bin/src/vboxpci/
|
---|
45 | VBoxPci-sh_MODE = a+rx,u+w
|
---|
46 | VBoxPci-sh_SOURCES = \
|
---|
47 | $(VBoxPci-sh_0_OUTDIR)/build_in_tmp \
|
---|
48 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
|
---|
49 | VBoxPci-sh_CLEAN = $(VBoxPci-sh_0_OUTDIR)/build_in_tmp
|
---|
50 |
|
---|
51 |
|
---|
52 | includedep $(PATH_TARGET)/VBoxPci-src-1.dep
|
---|
53 | $$(VBoxPci-src_0_OUTDIR)/Makefile: \
|
---|
54 | $(PATH_SUB_CURRENT)/linux/Makefile \
|
---|
55 | $$(if $$(eq $$(VBoxPci/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
56 | | $$(dir $$@)
|
---|
57 | ifndef VBOX_WITH_HARDENING
|
---|
58 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
59 | else
|
---|
60 | $(QUIET)$(CP) -f $< $@
|
---|
61 | endif
|
---|
62 | %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxPci-src-1.dep
|
---|
63 | %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxPci-src-1.dep' 'VBoxPci/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
64 |
|
---|
65 | ## Scripts needed for building the kernel modules
|
---|
66 |
|
---|
67 | $$(VBoxPci-sh_0_OUTDIR)/build_in_tmp: \
|
---|
68 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
|
---|
69 | $(VBOX_VERSION_STAMP) \
|
---|
70 | | $$(dir $$@)
|
---|
71 | $(call MSG_TOOL,Creating,,$@)
|
---|
72 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxpci;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
|
---|
73 | $(QUIET)chmod 0755 $@
|
---|
74 | endif
|
---|
75 |
|
---|
76 | endif
|
---|
77 |
|
---|
78 | include $(KBUILD_PATH)/subfooter.kmk
|
---|