2015-05-05 11:42:12 +03:00
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
|
|
CFLAGS += -Wall -g -D_GNU_SOURCE
|
2015-02-26 11:49:25 +03:00
|
|
|
|
2016-05-25 16:31:13 +03:00
|
|
|
BINDIR=usr/bin
|
|
|
|
INSTALL_PROGRAM=install -m 755 -p
|
|
|
|
DEL_FILE=rm -f
|
|
|
|
|
2016-05-24 18:03:55 +03:00
|
|
|
all: iio_event_monitor lsiio iio_generic_buffer
|
2015-02-26 11:49:25 +03:00
|
|
|
|
|
|
|
iio_event_monitor: iio_event_monitor.o iio_utils.o
|
|
|
|
|
|
|
|
lsiio: lsiio.o iio_utils.o
|
|
|
|
|
2016-05-24 18:03:55 +03:00
|
|
|
iio_generic_buffer: iio_generic_buffer.o iio_utils.o
|
2015-02-26 11:49:25 +03:00
|
|
|
|
|
|
|
%.o: %.c iio_utils.h
|
|
|
|
|
2016-05-25 16:31:13 +03:00
|
|
|
install:
|
|
|
|
- mkdir -p $(INSTALL_ROOT)/$(BINDIR)
|
|
|
|
- $(INSTALL_PROGRAM) "iio_event_monitor" "$(INSTALL_ROOT)/$(BINDIR)/iio_event_monitor"
|
|
|
|
- $(INSTALL_PROGRAM) "lsiio" "$(INSTALL_ROOT)/$(BINDIR)/lsiio"
|
2016-05-24 18:03:55 +03:00
|
|
|
- $(INSTALL_PROGRAM) "iio_generic_buffer" "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer"
|
2016-05-25 16:31:13 +03:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_event_monitor"
|
|
|
|
$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/lsiio"
|
2016-05-24 18:03:55 +03:00
|
|
|
$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer"
|
2016-05-25 16:31:13 +03:00
|
|
|
|
2015-02-26 11:49:25 +03:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2016-05-24 18:03:55 +03:00
|
|
|
rm -f *.o iio_event_monitor lsiio iio_generic_buffer
|