blob: 5446d625e17d63ab977900625581eed7a0de1735 [file] [log] [blame]
Linus Walleij54628682015-05-05 10:42:12 +02001CC = $(CROSS_COMPILE)gcc
2CFLAGS += -Wall -g -D_GNU_SOURCE
Roberta Dobrescu817020c2015-02-26 10:49:25 +02003
Peter Robinson0c4b6502016-05-25 14:31:13 +01004BINDIR=usr/bin
5INSTALL_PROGRAM=install -m 755 -p
6DEL_FILE=rm -f
7
Daniel Baluta5d48d6b2016-05-24 18:03:55 +03008all: iio_event_monitor lsiio iio_generic_buffer
Roberta Dobrescu817020c2015-02-26 10:49:25 +02009
10iio_event_monitor: iio_event_monitor.o iio_utils.o
11
12lsiio: lsiio.o iio_utils.o
13
Daniel Baluta5d48d6b2016-05-24 18:03:55 +030014iio_generic_buffer: iio_generic_buffer.o iio_utils.o
Roberta Dobrescu817020c2015-02-26 10:49:25 +020015
16%.o: %.c iio_utils.h
17
Peter Robinson0c4b6502016-05-25 14:31:13 +010018install:
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"
Daniel Baluta5d48d6b2016-05-24 18:03:55 +030022 - $(INSTALL_PROGRAM) "iio_generic_buffer" "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer"
Peter Robinson0c4b6502016-05-25 14:31:13 +010023
24uninstall:
25 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_event_monitor"
26 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/lsiio"
Daniel Baluta5d48d6b2016-05-24 18:03:55 +030027 $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/iio_generic_buffer"
Peter Robinson0c4b6502016-05-25 14:31:13 +010028
Roberta Dobrescu817020c2015-02-26 10:49:25 +020029.PHONY: clean
30clean:
Daniel Baluta5d48d6b2016-05-24 18:03:55 +030031 rm -f *.o iio_event_monitor lsiio iio_generic_buffer