Makefile 514 B

12345678910111213141516171819202122232425262728
  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. ifeq ($(ARCH),x86)
  5. PROGS := mpssd
  6. CC = $(CROSS_COMPILE)gcc
  7. CFLAGS := -I../../../usr/include -I../../../tools/include
  8. ifdef DEBUG
  9. CFLAGS += -DDEBUG=$(DEBUG)
  10. endif
  11. all: $(PROGS)
  12. mpssd: mpssd.c sysfs.c
  13. $(CC) $(CFLAGS) mpssd.c sysfs.c -o mpssd -lpthread
  14. install:
  15. install mpssd /usr/sbin/mpssd
  16. install micctrl /usr/sbin/micctrl
  17. clean:
  18. rm -fr $(PROGS)
  19. endif
  20. endif