Makefile 872 B

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