diff --git a/asyn/Makefile b/asyn/Makefile index 60890015..fda46d42 100644 --- a/asyn/Makefile +++ b/asyn/Makefile @@ -263,11 +263,26 @@ ifeq ($(DRV_FTDI),YES) asyn_SYS_LIBS += usb-1.0 INC += drvAsynFTDIPort.h ifeq ($(DRV_FTDI_USE_LIBFTDI1),YES) - asyn_SYS_LIBS += ftdi1 USR_CXXFLAGS += -DHAVE_LIBFTDI1 + ifeq ($(FTDI_LIB),) + asyn_SYS_LIBS += ftdi1 + else + asyn_LIBS += ftdi1 + ftdi1_DIR = $(FTDI_LIB) + endif else - asyn_SYS_LIBS += ftdi + ifeq ($(FTDI_LIB),) + asyn_SYS_LIBS += ftdi + else + asyn_LIBS += ftdi + ftdi_DIR = $(FTDI_LIB) + endif endif + + ifdef FTDI_INCLUDE + USR_INCLUDES += $(addprefix -I, $(FTDI_INCLUDE)) + endif + DBD += drvAsynFTDIPort.dbd endif