-
Notifications
You must be signed in to change notification settings - Fork 76
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
Define asyn_SYS_LIBS* in a way that dependent drivers can find it #141
Comments
That seems like a nice idea, but I am not sure how to implement it. $(EPICS_BASE_IOC_LIBS) is quite simple because it is never dependent on EPICS_HOST_ARCH nor on site-specific packages. It is just defined here:
asyn on the other hand uses SYS_LIBS that are dependent on EPICS_HOST_ARCH and on whether certain packages are installed or not. It starts with the contents of CONFIG_SITE:
and then these variables are used in asyn/Makefile to define SYS_LIBS:
There would thus need to be a configuration file that defined these for each EPICS_HOST_ARCH, and that configuration file would need to available to other modules that depend on asyn. |
Asyn can install a CFG file # CONFIG_ASYN_MODULE
ifneq ($(T_A),)
include $(ASYN)/cfg/ASYN.$(EPICS_HOST_ARCH).$(T_A)
endif The Asyn build knows how it has been configured for its specific host+target combination, so the # ASYN.centos8-x86_64.centos8-x86_64
asyn_IOC_LIBS += asyn
asyn_SYS_LIBS += tirpc
asyn_SYS_LIBS += usb-1.0
asyn_SYS_LIBS += ftdi1 Note that there's no need to set |
I'm not clear on how having asyn_SYS_LIBS defined to include those system libraries helps when I am building an IOC. Do I do the following in my IOC Makefile?
|
Almost: PROD_LIBS += $(asyn_IOC_LIBS)
PROD_LIBS += $(EPICS_BASE_IOC_LIBS)
PROD_SYS_LIBS += $(asyn_SYS_LIBS) This can obviously be extended to other modules too, say PROD_LIBS += $(modbus_IOC_LIBS)
PROD_LIBS += $(asyn_IOC_LIBS)
PROD_LIBS += $(EPICS_BASE_IOC_LIBS)
PROD_SYS_LIBS += $(asyn_SYS_LIBS) I don't think One thing we have to be careful of with these names though is that the variable |
Under some circumstances, drivers dependent on asyn seemingly require to link with the same SYS_LIBS as asyn. At least that‘s what some StreamDevice users tell me. But how should those drivers know when asyn_SYS_LIBS is only defined in the asyn Makefile?
It would be nice to have some macro like $(EPICS_BASE_IOC_LIBS) for asyn too.
Can asyn_SYS_LIBS be defined in a file that other Makefiles can include?
The text was updated successfully, but these errors were encountered: