Files
diag/Makefile
Bjorn Andersson 0c8d5f50b5 peripheral: Extract rpmsg specifics to separate file
Move the rpmsg based peripheral discovery and communication
implementation, in order to be able to make it depend on the presence of
libudev.h. This is useful as the dependency of this is optional in the
new AF_QIPCRTR based communication model.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-07-12 21:47:31 -07:00

42 lines
548 B
Makefile

HAVE_LIBUDEV=1
DIAG := diag
CFLAGS := -Wall -g -O2
ifeq ($(HAVE_LIBUDEV),1)
CFLAGS += -DHAS_LIBUDEV=1
LDFLAGS += -ludev
endif
SRCS := app_cmds.c \
circ_buf.c \
common_cmds.c \
diag.c \
diag_cntl.c \
dm.c \
hdlc.c \
masks.c \
mbuf.c \
peripheral.c \
router.c \
socket.c \
uart.c \
usb.c \
util.c \
watch.c
ifeq ($(HAVE_LIBUDEV),1)
SRCS += peripheral-rpmsg.c
endif
OBJS := $(SRCS:.c=.o)
$(DIAG): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
install: $(DIAG)
install -D -m 755 $< $(DESTDIR)$(prefix)/bin/$<
clean:
rm -f $(DIAG) $(OBJS)