Commit 6859eba4 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

samples: mei: use hostprogs kbuild constructs

Use hostprogs kbuild constructs to compile
mei sample program mei-amt-version

Add CONFIG_SAMPLE_INTEL_MEI option to enable/disable
the feature.
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191010132710.4075-1-tomas.winkler@intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 834c7360
...@@ -169,4 +169,11 @@ config SAMPLE_VFS ...@@ -169,4 +169,11 @@ config SAMPLE_VFS
as mount API and statx(). Note that this is restricted to the x86 as mount API and statx(). Note that this is restricted to the x86
arch whilst it accesses system calls that aren't yet in all arches. arch whilst it accesses system calls that aren't yet in all arches.
config SAMPLE_INTEL_MEI
bool "Build example program working with intel mei driver"
depends on INTEL_MEI
help
Build a sample program to work with mei device.
endif # SAMPLES endif # SAMPLES
...@@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/ ...@@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/
obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/ obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
obj-y += vfio-mdev/ obj-y += vfio-mdev/
subdir-$(CONFIG_SAMPLE_VFS) += vfs subdir-$(CONFIG_SAMPLE_VFS) += vfs
obj-$(CONFIG_SAMPLE_INTEL_MEI) += mei/
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
CC := $(CROSS_COMPILE)gcc # Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
CFLAGS := -I../../usr/include
PROGS := mei-amt-version hostprogs-y := mei-amt-version
all: $(PROGS) HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
clean: always := $(hostprogs-y)
rm -fr $(PROGS)
all: mei-amt-version
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment