Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

samples: move mic/mpssd example code from Documentation

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>

+28 -23
+1 -1
Documentation/Makefile
··· 1 1 subdir-y := accounting auxdisplay blackfin \ 2 - laptops mic misc-devices pcmcia timers watchdog 2 + laptops misc-devices pcmcia timers watchdog
-1
Documentation/mic/Makefile
··· 1 - subdir-y := mpssd
Documentation/mic/mpssd/.gitignore samples/mic/mpssd/.gitignore
-21
Documentation/mic/mpssd/Makefile
··· 1 - ifndef CROSS_COMPILE 2 - # List of programs to build 3 - hostprogs-$(CONFIG_X86_64) := mpssd 4 - 5 - mpssd-objs := mpssd.o sysfs.o 6 - 7 - # Tell kbuild to always build the programs 8 - always := $(hostprogs-y) 9 - 10 - HOSTCFLAGS += -I$(objtree)/usr/include -I$(srctree)/tools/include 11 - 12 - ifdef DEBUG 13 - HOSTCFLAGS += -DDEBUG=$(DEBUG) 14 - endif 15 - 16 - HOSTLOADLIBES_mpssd := -lpthread 17 - 18 - install: 19 - install mpssd /usr/sbin/mpssd 20 - install micctrl /usr/sbin/micctrl 21 - endif
Documentation/mic/mpssd/micctrl samples/mic/mpssd/micctrl
Documentation/mic/mpssd/mpss samples/mic/mpssd/mpss
Documentation/mic/mpssd/mpssd.c samples/mic/mpssd/mpssd.c
Documentation/mic/mpssd/mpssd.h samples/mic/mpssd/mpssd.h
Documentation/mic/mpssd/sysfs.c samples/mic/mpssd/sysfs.c
+27
samples/mic/mpssd/Makefile
··· 1 + ifndef CROSS_COMPILE 2 + uname_M := $(shell uname -m 2>/dev/null || echo not) 3 + ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) 4 + 5 + ifeq ($(ARCH),x86) 6 + 7 + PROGS := mpssd 8 + CC = $(CROSS_COMPILE)gcc 9 + CFLAGS := -I../../../usr/include -I../../../tools/include 10 + 11 + ifdef DEBUG 12 + CFLAGS += -DDEBUG=$(DEBUG) 13 + endif 14 + 15 + all: $(PROGS) 16 + mpssd: mpssd.c sysfs.c 17 + $(CC) $(CFLAGS) mpssd.c sysfs.c -o mpssd -lpthread 18 + 19 + install: 20 + install mpssd /usr/sbin/mpssd 21 + install micctrl /usr/sbin/micctrl 22 + 23 + clean: 24 + rm -fr $(PROGS) 25 + 26 + endif 27 + endif