Makefile.kmk revision c285785ffc9f35513e0c6e7e2a05df3090dc919c
a4544a5a0e622ef69e38641f87ab1b5685e05911Phill CunningtonSUB_DEPTH = ../../../..
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude $(KBUILD_PATH)/subheader.kmk
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterif1of ($(KBUILD_TARGET), linux)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterSYSMODS += VBoxPci
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_TEMPLATE = VBOXR0DRV
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_INST = $(INST_VBOXPCI)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxpci\) KBUILD_BASENAME=KBUILD_STR\(vboxpci\) MODULE
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_INCS = \
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_SOURCES =
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterVBoxPci_LIBS += \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifeq ($(KBUILD_TARGET),linux)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster include $(PATH_SUB_CURRENT)/linux/files_vboxpci
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster INSTALLS += VBoxPci-src VBoxPci-sh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-src_INST = bin/src/vboxpci/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-src_MODE = a+r,u+w
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-src_SOURCES = $(subst ",,$(VBOX_VBOXPCI_SOURCES)) #"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-src_SOURCES+= \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(VBoxPci-src_0_OUTDIR)/Makefile
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-src_CLEAN = \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(VBoxPci-src_0_OUTDIR)/Makefile \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-sh_INST = bin/src/vboxpci/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-sh_MODE = a+rx,u+w
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-sh_SOURCES = \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(VBoxPci-sh_0_OUTDIR)/build_in_tmp \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster VBoxPci-sh_CLEAN = $(VBoxPci-sh_0_OUTDIR)/build_in_tmp
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterincludedep $(PATH_TARGET)/VBoxPci-src-1.dep
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$$(VBoxPci-src_0_OUTDIR)/Makefile: \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(PATH_SUB_CURRENT)/linux/Makefile \
8d3140b524c0e28c0a49dc7c7d481123ef3cfe11Chris Lee $$(if $$(eq $$(VBoxPci/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster | $$(dir $$@)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterifndef VBOX_WITH_HARDENING
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(QUIET)$(CP) -f $< $@
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxPci-src-1.dep
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxPci-src-1.dep' 'VBoxPci/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster## Scripts needed for building the kernel modules
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$$(VBoxPci-sh_0_OUTDIR)/build_in_tmp: \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(VBOX_VERSION_STAMP) \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster | $$(dir $$@)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(call MSG_TOOL,Creating,,$@)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxpci;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(QUIET)chmod 0755 $@
0e8561b1f4ae8fce3b1cac5dff812a95182b4ae1jeff.schenkinclude $(KBUILD_PATH)/subfooter.kmk