From cbe140fa18216b415bd95b9ea958f85902c529ea Mon Sep 17 00:00:00 2001 From: Christian Gollwitzer Date: Thu, 22 May 2025 16:14:23 +0200 Subject: [PATCH 1/2] Allow to specify the path to the FTDI library --- asyn/Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/asyn/Makefile b/asyn/Makefile index 60890015..b88327dd 100644 --- a/asyn/Makefile +++ b/asyn/Makefile @@ -263,11 +263,25 @@ 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 + 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 From 4b7bba765f1a28e04495b323e37801352a664eae Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 22 May 2025 21:04:13 +0200 Subject: [PATCH 2/2] Fix whitespace in Makefile --- asyn/Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/asyn/Makefile b/asyn/Makefile index b88327dd..fda46d42 100644 --- a/asyn/Makefile +++ b/asyn/Makefile @@ -263,21 +263,22 @@ ifeq ($(DRV_FTDI),YES) asyn_SYS_LIBS += usb-1.0 INC += drvAsynFTDIPort.h ifeq ($(DRV_FTDI_USE_LIBFTDI1),YES) - USR_CXXFLAGS += -DHAVE_LIBFTDI1 - ifeq ($(FTDI_LIB),) - asyn_SYS_LIBS += ftdi1 - else - asyn_LIBS += ftdi1 - ftdi1_DIR = $(FTDI_LIB) - endif + USR_CXXFLAGS += -DHAVE_LIBFTDI1 + ifeq ($(FTDI_LIB),) + asyn_SYS_LIBS += ftdi1 + else + asyn_LIBS += ftdi1 + ftdi1_DIR = $(FTDI_LIB) + endif else - ifeq ($(FTDI_LIB),) - asyn_SYS_LIBS += ftdi - else - asyn_LIBS += ftdi - ftdi_DIR = $(FTDI_LIB) - endif + 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