@@ -12,10 +12,16 @@ USR_CXXFLAGS_Linux += -Wno-write-strings
1212ifdef ULDAQ_INCLUDE
1313 USR_INCLUDES_Linux += -I$(ULDAQ_INCLUDE )
1414endif
15+ ifdef USB_INCLUDE
16+ USR_INCLUDES_Linux += -I$(USB_INCLUDE )
17+ endif
1518
1619ifdef ULDAQ_DIR
1720 uldaq_DIR = $(ULDAQ_DIR )
1821endif
22+ ifdef USB_DIR
23+ usb-1.0_DIR = $(USB_DIR )
24+ endif
1925
2026DBD += measCompApp.dbd
2127DBD += measCompSupport.dbd
@@ -72,7 +78,11 @@ ifdef ULDAQ_DIR
7278else
7379 measCompApp_SYS_LIBS_Linux += uldaq
7480endif
75- measCompApp_SYS_LIBS_Linux += usb-1.0
81+ ifdef USB_DIR
82+ measCompApp_LIBS_Linux += usb-1.0
83+ else
84+ measCompApp_SYS_LIBS_Linux += usb-1.0
85+ endif
7686
7787# Finally link to the EPICS Base libraries
7888measCompApp_LIBS += $(EPICS_BASE_IOC_LIBS )
@@ -113,7 +123,11 @@ ifdef ULDAQ_DIR
113123else
114124 test_measCompDiscover_SYS_LIBS_Linux += uldaq
115125endif
116- test_measCompDiscover_SYS_LIBS_Linux += usb-1.0
126+ ifdef USB_DIR
127+ test_measCompDiscover_LIBS_Linux += usb-1.0
128+ else
129+ test_measCompDiscover_SYS_LIBS_Linux += usb-1.0
130+ endif
117131test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS )
118132
119133# These are test programs which were used when finding Ubuntu18 had problems with scans > 1000 points/s
@@ -123,15 +137,23 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
123137# else
124138# test_AInScan_Linux_SYS_LIBS += uldaq
125139# endif
126- # test_AInScan_Linux_SYS_LIBS += usb-1.0
140+ # ifdef USB_DIR
141+ # test_AInScan_Linux_LIBS += usb-1.0
142+ # else
143+ # test_AInScan_Linux_SYS_LIBS += usb-1.0
144+ # endif
127145
128146# PROD_IOC_Linux += test_USB_CTR
129147# ifdef ULDAQ_DIR
130148# test_USB_CTR_LIBS_Linux += uldaq
131149# else
132150# test_USB_CTR_SYS_LIBS_Linux += uldaq
133151# endif
134- # test_USB_CTR_SYS_LIBS_Linux += usb-1.0
152+ # ifdef USB_DIR
153+ # test_USB_CTR_LIBS_Linux += usb-1.0
154+ # else
155+ # test_USB_CTR_SYS_LIBS_Linux += usb-1.0
156+ # endif
135157# PROD_IOC_WIN32 += test_USB_CTR
136158# test_USB_CTR_LIBS_WIN32 += cbw64
137159
@@ -142,7 +164,11 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
142164# else
143165# DaqInScan_SYS_LIBS_Linux += uldaq
144166# endif
145- # DaqInScan_SYS_LIBS_Linux += usb-1.0
167+ # ifdef USB_DIR
168+ # DaqInScan_LIBS_Linux += usb-1.0
169+ # else
170+ # DaqInScan_SYS_LIBS_Linux += usb-1.0
171+ # endif
146172
147173# This test program shows temperature glitches on Linux with USB-2408 and data rate <= 20 Hz.
148174# PROD_IOC_Linux += 2408_TIn
@@ -152,15 +178,23 @@ test_measCompDiscover_LIBS += $(EPICS_BASE_IOC_LIBS)
152178# else
153179# 2408_TIn_SYS_LIBS_Linux += uldaq
154180# endif
155- # 2408_TIn_SYS_LIBS_Linux += usb-1.0
181+ # ifdef USB_DIR
182+ # 2408_TIn_LIBS_Linux += usb-1.0
183+ # else
184+ # 2408_TIn_SYS_LIBS_Linux += usb-1.0
185+ # endif
156186
157187# PROD_IOC_Linux += test_USB_CTR_fdiv
158188# ifdef ULDAQ_DIR
159189# test_USB_CTR_fdiv_LIBS_Linux += uldaq
160190# else
161191# test_USB_CTR_fdiv_SYS_LIBS_Linux += uldaq
162192# endif
163- # test_USB_CTR_fdiv_SYS_LIBS_Linux += usb-1.0
193+ # ifdef USB_DIR
194+ # test_USB_CTR_fdiv_LIBS_Linux += usb-1.0
195+ # else
196+ # test_USB_CTR_fdiv_SYS_LIBS_Linux += usb-1.0
197+ # endif
164198# PROD_IOC_WIN32 += test_USB_CTR_fdiv
165199# test_USB_CTR_fdiv_LIBS_WIN32 += cbw64
166200
@@ -173,7 +207,12 @@ ifdef ULDAQ_DIR
173207else
174208 testDualEthDevice_SYS_LIBS_Linux += uldaq
175209endif
176- testDualEthDevice_SYS_LIBS_Linux += usb-1.0 pthread
210+ ifdef USB_DIR
211+ testDualEthDevice_LIBS_Linux += usb-1.0
212+ else
213+ testDualEthDevice_SYS_LIBS_Linux += usb-1.0
214+ endif
215+ testDualEthDevice_SYS_LIBS_Linux += pthread
177216# =============================
178217
179218include $(TOP ) /configure/RULES
0 commit comments