samples: move mic/mpssd example code from Documentation
commit 6bee835dd54e279f3d3ae2eca92a9c394b4fd028 upstream. Move mic/mpssd examples to samples and remove it from Documentation Makefile. Create a new Makefile to build mic/mpssd. It can be built from top level directory or from mic/mpssd directory: Run make -C samples/mic/mpssd or cd samples/mic/mpssd; make Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> [backported to 4.4-stable as this code is broken on newer versions of gcc and we don't want to break the build for a Documentation sample. - gregkh] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dd4534d88b
commit
faf6aa4b12
10 changed files with 28 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
||||||
subdir-y := accounting auxdisplay blackfin connector \
|
subdir-y := accounting auxdisplay blackfin connector \
|
||||||
filesystems filesystems ia64 laptops mic misc-devices \
|
filesystems filesystems ia64 laptops misc-devices \
|
||||||
networking pcmcia prctl ptp spi timers vDSO video4linux \
|
networking pcmcia prctl ptp spi timers vDSO video4linux \
|
||||||
watchdog
|
watchdog
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
subdir-y := mpssd
|
|
|
@ -1,21 +0,0 @@
|
||||||
ifndef CROSS_COMPILE
|
|
||||||
# List of programs to build
|
|
||||||
hostprogs-$(CONFIG_X86_64) := mpssd
|
|
||||||
|
|
||||||
mpssd-objs := mpssd.o sysfs.o
|
|
||||||
|
|
||||||
# Tell kbuild to always build the programs
|
|
||||||
always := $(hostprogs-y)
|
|
||||||
|
|
||||||
HOSTCFLAGS += -I$(objtree)/usr/include -I$(srctree)/tools/include
|
|
||||||
|
|
||||||
ifdef DEBUG
|
|
||||||
HOSTCFLAGS += -DDEBUG=$(DEBUG)
|
|
||||||
endif
|
|
||||||
|
|
||||||
HOSTLOADLIBES_mpssd := -lpthread
|
|
||||||
|
|
||||||
install:
|
|
||||||
install mpssd /usr/sbin/mpssd
|
|
||||||
install micctrl /usr/sbin/micctrl
|
|
||||||
endif
|
|
27
samples/mic/mpssd/Makefile
Normal file
27
samples/mic/mpssd/Makefile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
ifndef CROSS_COMPILE
|
||||||
|
uname_M := $(shell uname -m 2>/dev/null || echo not)
|
||||||
|
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86)
|
||||||
|
|
||||||
|
PROGS := mpssd
|
||||||
|
CC = $(CROSS_COMPILE)gcc
|
||||||
|
CFLAGS := -I../../../usr/include -I../../../tools/include
|
||||||
|
|
||||||
|
ifdef DEBUG
|
||||||
|
CFLAGS += -DDEBUG=$(DEBUG)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: $(PROGS)
|
||||||
|
mpssd: mpssd.c sysfs.c
|
||||||
|
$(CC) $(CFLAGS) mpssd.c sysfs.c -o mpssd -lpthread
|
||||||
|
|
||||||
|
install:
|
||||||
|
install mpssd /usr/sbin/mpssd
|
||||||
|
install micctrl /usr/sbin/micctrl
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr $(PROGS)
|
||||||
|
|
||||||
|
endif
|
||||||
|
endif
|
0
Documentation/mic/mpssd/micctrl → samples/mic/mpssd/micctrl
Executable file → Normal file
0
Documentation/mic/mpssd/micctrl → samples/mic/mpssd/micctrl
Executable file → Normal file
0
Documentation/mic/mpssd/mpss → samples/mic/mpssd/mpss
Executable file → Normal file
0
Documentation/mic/mpssd/mpss → samples/mic/mpssd/mpss
Executable file → Normal file
Loading…
Add table
Reference in a new issue