Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2188847ybp; Thu, 10 Oct 2019 03:43:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyF6kwKMhccarVfjT5QdfAZ5yIoBbemhH+iC4ayahXHutf/2az2P517+xzRZdtjGVk2Jjrc X-Received: by 2002:a17:907:20c8:: with SMTP id qq8mr7301984ejb.311.1570704231662; Thu, 10 Oct 2019 03:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570704231; cv=none; d=google.com; s=arc-20160816; b=yfgeN9BV82RIXcjzP5Cq8nstgoDy9hdnqNqfIRYMe48SqxmN10Sfn6dJancuLchiuU E4kUOYSyZE4qlHAvD1YxNZxPmhsn3U7bdIm1gGEm9WX9wqZC3S+MkSkE6nEZlir6gQLK csbP226dbrVPqblMEoIUwNwnaQU77p4J4NtLVwuxeW/U7SMw9JVPwOHIJ1C5zvPpAcKV zSAekzjw7c5oPo1c/IYm4pveGa8VvB33eYvxooKpmkNNCODjIlH2LRBu7nnRYG1Cwtem 9J5dC/Mipa2gP33Fkidsw3pnVrl2qd1938wuz0OVzEFM6TISdKXZEjBntUYNxWLXOJbV dQ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Kws3iyJskSXC7soOLZSp3npUtfZgmYW9YuW73EmdEK4=; b=OAl8Jix8Vo4lXm+EvPeosIxDscfFypCPM1wjpTT6AmBKuIIKmGo0k145R/VNjH0Jzr ITcP9TRM+VWqgw4iEuRz4r3+J7TIuEC+77p1yAEusf5wgNddhsFr/H/q6Unqq2ZEHhD4 8jaqyE3NUtmpQOTRE3GRCna9miQLIPO2d3XbvloqG0QkZJOqzFXT0h52h5GvoJjZRCHr 2a9rgHc1AAde4xQLCkk4dlIIisZHs5jSZfjvMFx2xsjAQ7kVpdUaBu6Cb6uefZl1fWVP tR0ePxtNZ6ryBs/t6RiklTNCwVX6oZoQSiye7F9SFLKeNs8KB37TXnQXlH0tRaeHq0jj Uo4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15si3019815edq.430.2019.10.10.03.43.28; Thu, 10 Oct 2019 03:43:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732944AbfJJKlP (ORCPT + 99 others); Thu, 10 Oct 2019 06:41:15 -0400 Received: from mga11.intel.com ([192.55.52.93]:49352 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732923AbfJJKlP (ORCPT ); Thu, 10 Oct 2019 06:41:15 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2019 03:41:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,279,1566889200"; d="scan'208";a="187917759" Received: from twinkler-lnx.jer.intel.com ([10.12.91.155]) by orsmga008.jf.intel.com with ESMTP; 10 Oct 2019 03:41:13 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next] samples: mei: use hostprogs kbuild constructs Date: Thu, 10 Oct 2019 16:27:10 +0300 Message-Id: <20191010132710.4075-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- samples/Kconfig | 7 +++++++ samples/Makefile | 1 + samples/mei/Makefile | 12 ++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/samples/Kconfig b/samples/Kconfig index c8dacb4dda80..b663d9d24114 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -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 diff --git a/samples/Makefile b/samples/Makefile index 7d6e4ca28d69..d6062ab25347 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -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/ diff --git a/samples/mei/Makefile b/samples/mei/Makefile index c7e52e9e92ca..27f37efdadb4 100644 --- a/samples/mei/Makefile +++ b/samples/mei/Makefile @@ -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 -- 2.21.0