Skip to content

Commit 6859eba

Browse files
Tomas Winklergregkh
authored andcommitted
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>
1 parent 834c736 commit 6859eba

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎samples/Kconfig‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,11 @@ config SAMPLE_VFS
169169
as mount API and statx(). Note that this is restricted to the x86
170170
arch whilst it accesses system calls that aren't yet in all arches.
171171

172+
config SAMPLE_INTEL_MEI
173+
bool "Build example program working with intel mei driver"
174+
depends on INTEL_MEI
175+
help
176+
Build a sample program to work with mei device.
177+
178+
172179
endif # SAMPLES

‎samples/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/
2020
obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
2121
obj-y += vfio-mdev/
2222
subdir-$(CONFIG_SAMPLE_VFS) += vfs
23+
obj-$(CONFIG_SAMPLE_INTEL_MEI) += mei/

‎samples/mei/Makefile‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
CC := $(CROSS_COMPILE)gcc
3-
CFLAGS := -I../../usr/include
2+
# Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
43

5-
PROGS := mei-amt-version
4+
hostprogs-y := mei-amt-version
65

7-
all: $(PROGS)
6+
HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
87

9-
clean:
10-
rm -fr $(PROGS)
8+
always := $(hostprogs-y)
9+
10+
all: mei-amt-version

0 commit comments

Comments
 (0)