Skip to content

Commit

Permalink
samples: move mic/mpssd example code from Documentation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shuah Khan committed Sep 20, 2016
1 parent 3d2c86e commit 6bee835
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Documentation/Makefile
@@ -1,2 +1,2 @@
subdir-y := accounting auxdisplay blackfin \
laptops mic misc-devices pcmcia timers watchdog
laptops misc-devices pcmcia timers 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
@@ -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 6bee835

Please sign in to comment.