1CC = $(CROSS_COMPILE)gcc 2CFLAGS += -Wall -g -D_GNU_SOURCE -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include 3 4BINDIR=usr/bin 5INSTALL_PROGRAM=install -m 755 -p 6DEL_FILE=rm -f 7 8all: iio_event_monitor lsiio iio_generic_buffer 9 10iio_event_monitor: iio_event_monitor.o iio_utils.o 11 12lsiio: lsiio.o iio_utils.o 13 14iio_generic_buffer: iio_generic_buffer.o iio_utils.o 15 16%.o: %.c iio_utils.h 17 18install: 19 - mkdir -p $(INSTALL_ROOT)/$(BINDIR) 20 - $(INSTALL_PROGRAM) "iio_event_monitor" "$(INSTALL_ROOT)/$(BINDIR)/iio_event_monitor" 21 - $(INSTALL_PROGRAM) "lsiio" "$(INSTALL_ROOT)/$(BINDIR)/lsiio" 22 - $(INSTALL_PROGRAM) "iio_generic_buffer" "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer" 23 24uninstall: 25 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_event_monitor" 26 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/lsiio" 27 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer" 28 29.PHONY: clean 30clean: 31 rm -f *.o iio_event_monitor lsiio iio_generic_buffer 32