Merge tag 'linux-kselftest-4.9-rc1-update' of git://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / 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