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