mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
Makefile: adapt for libftdi vs libftdi1 differences
Use the cflags and libs from pkg-config. This allows us to adapt to the distro differences. Also, make sure to autodetect if the distro provides libftdi or libftdi1, preferring the latter one. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
5
Makefile
5
Makefile
@@ -26,7 +26,10 @@ else
|
||||
$(info No compiler flags for: $(CC))
|
||||
endif
|
||||
|
||||
LDFLAGS := -ludev -lyaml -lftdi -lusb
|
||||
LIBFTDI := $(shell pkg-config --exists libftdi1 && echo libftdi1 || echo libftdi)
|
||||
|
||||
CPPFLAGS := $(shell pkg-config --cflags yaml-0.1 $(LIBFTDI) libudev)
|
||||
LDFLAGS := $(shell pkg-config --libs yaml-0.1 $(LIBFTDI) libudev)
|
||||
|
||||
CLIENT_SRCS := cdba.c circ_buf.c
|
||||
CLIENT_OBJS := $(CLIENT_SRCS:.c=.o)
|
||||
|
||||
Reference in New Issue
Block a user