Skip to content

Commit

Permalink
samples: move mic/mpssd example code from Documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shuah Khan authored and gregkh committed Mar 12, 2017
1 parent dd4534d commit faf6aa4
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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 \
watchdog
1 change: 0 additions & 1 deletion Documentation/mic/Makefile

This file was deleted.

21 changes: 0 additions & 21 deletions Documentation/mic/mpssd/Makefile

This file was deleted.

File renamed without changes.
27 changes: 27 additions & 0 deletions samples/mic/mpssd/Makefile
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit faf6aa4

Please sign in to comment.