• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: GPL-2.0
2ifndef 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
29