alistair23-linux/tools/iio/Makefile
Roberta Dobrescu 976d9ab112 tools: iio: Define _GNU_SOURCE in Makefile
Definition of _GNU_SOURCE is needed to get rid of some warnings, such
as:
warning: implicit declaration of function `asprintf'.

generic_buffer.c and iio_event_monitor.c define _GNU_SOURCE,
but it is also needed in lsiio.c and iio_utils.c. For this reason,
this patch adds the definition in Makefile and removes it from where
it already exists.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-09 17:17:26 +00:00

17 lines
306 B
Makefile

CC = gcc
CFLAGS = -Wall -g -D_GNU_SOURCE
all: iio_event_monitor lsiio generic_buffer
iio_event_monitor: iio_event_monitor.o iio_utils.o
lsiio: lsiio.o iio_utils.o
generic_buffer: generic_buffer.o iio_utils.o
%.o: %.c iio_utils.h
.PHONY: clean
clean:
rm -f *.o iio_event_monitor lsiio generic_buffer