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