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