summaryrefslogtreecommitdiffstats
path: root/samples/mei
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-04-29 12:45:24 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-05-17 18:52:02 +0900
commitc4c10996b1940e197b45f827b99f40a4b82daebb (patch)
tree8a46c3e4b7de9a4e47e7e64e5811a5d152594e32 /samples/mei
parent60fb0b1239719df2ec92606fa037f7c116810762 (diff)
downloadlinux-c4c10996b1940e197b45f827b99f40a4b82daebb.tar.bz2
samples: mei: build sample program for target architecture
This userspace program includes UAPI headers exported to usr/include/. 'make headers' always works for the target architecture (i.e. the same architecture as the kernel), so the sample program should be built for the target as well. Kbuild now supports 'userprogs' for that. I also guarded the CONFIG option by 'depends on CC_CAN_LINK' because $(CC) may not provide libc. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'samples/mei')
-rw-r--r--samples/mei/Makefile9
1 files changed, 3 insertions, 6 deletions
diff --git a/samples/mei/Makefile b/samples/mei/Makefile
index f5b9d02be2cd..329411f82369 100644
--- a/samples/mei/Makefile
+++ b/samples/mei/Makefile
@@ -1,10 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
-hostprogs := mei-amt-version
+userprogs := mei-amt-version
+always-y := $(userprogs)
-HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
-
-always-y := $(hostprogs)
-
-all: mei-amt-version
+userccflags += -I usr/include