Skip to content

Commit

Permalink
samples: mei: use hostprogs kbuild constructs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tomasbw authored and gregkh committed Oct 21, 2019
1 parent 834c736 commit 6859eba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions samples/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions samples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
12 changes: 6 additions & 6 deletions samples/mei/Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6859eba

Please sign in to comment.