diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2016-09-17 00:53:52 +0300 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2016-09-20 21:38:48 +0300 |
commit | 6bee835dd54e279f3d3ae2eca92a9c394b4fd028 (patch) | |
tree | 5dfd18866d8ec5e533fa1173f2fc5c952c658cb6 /samples/mic/mpssd/Makefile | |
parent | 3d2c86e3057995270e08693231039d9d942871f0 (diff) | |
download | linux-6bee835dd54e279f3d3ae2eca92a9c394b4fd028.tar.xz |
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>
Diffstat (limited to 'samples/mic/mpssd/Makefile')
-rw-r--r-- | samples/mic/mpssd/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/samples/mic/mpssd/Makefile b/samples/mic/mpssd/Makefile new file mode 100644 index 000000000000..3e3ef91fed6b --- /dev/null +++ b/samples/mic/mpssd/Makefile @@ -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 |