Shuah Khan | 6bee835 | 2016-09-16 15:53:52 -0600 | [diff] [blame] | 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 |