blob: 3e3ef91fed6b3f741e4f273a1e0fb521ba21ba07 [file] [log] [blame]
Shuah Khan6bee8352016-09-16 15:53:52 -06001ifndef CROSS_COMPILE
2uname_M := $(shell uname -m 2>/dev/null || echo not)
3ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
4
5ifeq ($(ARCH),x86)
6
7PROGS := mpssd
8CC = $(CROSS_COMPILE)gcc
9CFLAGS := -I../../../usr/include -I../../../tools/include
10
11ifdef DEBUG
12CFLAGS += -DDEBUG=$(DEBUG)
13endif
14
15all: $(PROGS)
16mpssd: mpssd.c sysfs.c
17 $(CC) $(CFLAGS) mpssd.c sysfs.c -o mpssd -lpthread
18
19install:
20 install mpssd /usr/sbin/mpssd
21 install micctrl /usr/sbin/micctrl
22
23clean:
24 rm -fr $(PROGS)
25
26endif
27endif