mirror of
https://github.com/linux-msm/diag.git
synced 2026-02-25 13:11:48 -08:00
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>
42 lines
548 B
Makefile
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)
|