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