1
0
Fork 0

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: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191010132710.4075-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
alistair/sunxi64-5.5-dsi
Tomas Winkler 2019-10-10 16:27:10 +03:00 committed by Greg Kroah-Hartman
parent 834c7360f9
commit 6859eba4f6
3 changed files with 14 additions and 6 deletions

View File

@ -169,4 +169,11 @@ config SAMPLE_VFS
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.
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

View File

@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/
obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
obj-y += vfio-mdev/
subdir-$(CONFIG_SAMPLE_VFS) += vfs
obj-$(CONFIG_SAMPLE_INTEL_MEI) += mei/

View File

@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
CC := $(CROSS_COMPILE)gcc
CFLAGS := -I../../usr/include
# Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
PROGS := mei-amt-version
hostprogs-y := mei-amt-version
all: $(PROGS)
HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
clean:
rm -fr $(PROGS)
always := $(hostprogs-y)
all: mei-amt-version