Commit 87ffbba9 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

samples: auxdisplay: use 'userprogs' syntax



Kbuild now supports the 'userprogs' syntax to compile userspace
programs for the same architecture as the kernel.

Add the entry to samples/Makefile to put this into the build bot
coverage.

I also added the CONFIG option guarded by 'depends on CC_CAN_LINK'
because $(CC) may not provide libc.

Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Acked-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent c4c10996
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ menuconfig SAMPLES

if SAMPLES

config SAMPLE_AUXDISPLAY
	bool "auxdisplay sample"
	depends on CC_CAN_LINK

config SAMPLE_TRACE_EVENTS
	tristate "Build trace_events examples -- loadable modules only"
	depends on EVENT_TRACING && m
+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux samples code

subdir-$(CONFIG_SAMPLE_AUXDISPLAY)	+= auxdisplay
obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS)	+= binderfs/
obj-$(CONFIG_SAMPLE_CONFIGFS)		+= configfs/
obj-$(CONFIG_SAMPLE_CONNECTOR)		+= connector/
+2 −9
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
CC := $(CROSS_COMPILE)gcc
CFLAGS := -I../../usr/include

PROGS := cfag12864b-example

all: $(PROGS)

clean:
	rm -fr $(PROGS)
userprogs := cfag12864b-example
always-y := $(userprogs)