Skip to content

Add support for non-system usb library on Linux #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions configure/CONFIG_SITE
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ HAVE_ULDAQ=YES
#ULDAQ_DIR=/home/epics/local/lib
#ULDAQ_INCLUDE=/home/epics/local/include

# If libusb on Linux is not installed in a system directory (e.g. /usr/local)
# then uncomment and edit these lines to define the location of the include
# and lib directories.
#USB_DIR=/home/epics/local/lib
#USB_INCLUDE=/home/epics/local/include

# These allow developers to override the CONFIG_SITE variable
# settings without having to modify the configure/CONFIG_SITE
# file itself.
Expand Down
55 changes: 47 additions & 8 deletions measCompApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ USR_CXXFLAGS_Linux += -Wno-write-strings
ifdef ULDAQ_INCLUDE
USR_INCLUDES_Linux += -I$(ULDAQ_INCLUDE)
endif
ifdef USB_INCLUDE
USR_INCLUDES_Linux += -I$(USB_INCLUDE)
endif

ifdef ULDAQ_DIR
uldaq_DIR = $(ULDAQ_DIR)
endif
ifdef USB_DIR
usb-1.0_DIR = $(USB_DIR)
endif

DBD += measCompApp.dbd
DBD += measCompSupport.dbd
Expand Down Expand Up @@ -72,7 +78,11 @@ ifdef ULDAQ_DIR
else
measCompApp_SYS_LIBS_Linux += uldaq
endif
measCompApp_SYS_LIBS_Linux += usb-1.0
ifdef USB_DIR
measCompApp_LIBS_Linux += usb-1.0
else
measCompApp_SYS_LIBS_Linux += usb-1.0
endif

# Finally link to the EPICS Base libraries
measCompApp_LIBS += $(EPICS_BASE_IOC_LIBS)
Expand Down Expand Up @@ -113,7 +123,11 @@ ifdef ULDAQ_DIR
else
test_measCompDiscover_SYS_LIBS_Linux += uldaq
endif
test_measCompDiscover_SYS_LIBS_Linux += usb-1.0
ifdef USB_DIR
test_measCompDiscover_LIBS_Linux += usb-1.0
else
test_measCompDiscover_SYS_LIBS_Linux += usb-1.0
endif
test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)

# These are test programs which were used when finding Ubuntu18 had problems with scans > 1000 points/s
Expand All @@ -123,15 +137,23 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
#else
# test_AInScan_Linux_SYS_LIBS += uldaq
#endif
#test_AInScan_Linux_SYS_LIBS += usb-1.0
#ifdef USB_DIR
# test_AInScan_Linux_LIBS += usb-1.0
#else
# test_AInScan_Linux_SYS_LIBS += usb-1.0
#endif

#PROD_IOC_Linux += test_USB_CTR
#ifdef ULDAQ_DIR
# test_USB_CTR_LIBS_Linux += uldaq
#else
# test_USB_CTR_SYS_LIBS_Linux += uldaq
#endif
#test_USB_CTR_SYS_LIBS_Linux += usb-1.0
#ifdef USB_DIR
# test_USB_CTR_LIBS_Linux += usb-1.0
#else
# test_USB_CTR_SYS_LIBS_Linux += usb-1.0
#endif
#PROD_IOC_WIN32 += test_USB_CTR
#test_USB_CTR_LIBS_WIN32 += cbw64

Expand All @@ -142,7 +164,11 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
#else
# DaqInScan_SYS_LIBS_Linux += uldaq
#endif
#DaqInScan_SYS_LIBS_Linux += usb-1.0
#ifdef USB_DIR
# DaqInScan_LIBS_Linux += usb-1.0
#else
# DaqInScan_SYS_LIBS_Linux += usb-1.0
#endif

# This test program shows temperature glitches on Linux with USB-2408 and data rate <= 20 Hz.
#PROD_IOC_Linux += 2408_TIn
Expand All @@ -152,15 +178,23 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
#else
# 2408_TIn_SYS_LIBS_Linux += uldaq
#endif
#2408_TIn_SYS_LIBS_Linux += usb-1.0
#ifdef USB_DIR
# 2408_TIn_LIBS_Linux += usb-1.0
#else
# 2408_TIn_SYS_LIBS_Linux += usb-1.0
#endif

#PROD_IOC_Linux += test_USB_CTR_fdiv
#ifdef ULDAQ_DIR
# test_USB_CTR_fdiv_LIBS_Linux += uldaq
#else
# test_USB_CTR_fdiv_SYS_LIBS_Linux += uldaq
#endif
#test_USB_CTR_fdiv_SYS_LIBS_Linux += usb-1.0
#ifdef USB_DIR
# test_USB_CTR_fdiv_LIBS_Linux += usb-1.0
#else
# test_USB_CTR_fdiv_SYS_LIBS_Linux += usb-1.0
#endif
#PROD_IOC_WIN32 += test_USB_CTR_fdiv
#test_USB_CTR_fdiv_LIBS_WIN32 += cbw64

Expand All @@ -173,7 +207,12 @@ ifdef ULDAQ_DIR
else
testDualEthDevice_SYS_LIBS_Linux += uldaq
endif
testDualEthDevice_SYS_LIBS_Linux += usb-1.0 pthread
ifdef USB_DIR
testDualEthDevice_LIBS_Linux += usb-1.0
else
testDualEthDevice_SYS_LIBS_Linux += usb-1.0
endif
testDualEthDevice_SYS_LIBS_Linux += pthread
#=============================

include $(TOP)/configure/RULES
Expand Down