Including additional libraries to the ROOT build

Hello!
I am trying to do a proof of concept for allowing ROOT to communicate using something else than TCP/IP, and that is RapidIO, a low-latency interconnect. This is part of a CERN Openlab project with IDT.

What I have done so far is to create a new class that inherits TUnixSystem, and override some of the member functions that concern opening/closing sockets and send/recv on them.

I have reached a point where I have mock functionality working and the next step will be to add the RapidIO libraries in the library and header paths so that I can use them in my code.

My new class resides in core/unix/, side by side with TUnixSystem. What would be the best way of including the libraries and headers of RapidIO into the ROOT build system?

I have so far used make when I have built ROOT, so prefer continuing with that but doing it with CMake will be equally fine. I can see there is a Makefile.linuxx8664gcc (which is for my system) - but I have not been able to pinpoint the best way to introduce what I want in there.

Thanks for any pointers that you can give!

Adding in CMake would be the preferred way. Have a look at the file cmake/modules/SearchInstalledSoftware.cmake in this file you will need to call find_package(RapidIO), perhaps if an option is set. This will make use of a module FindRapidIO.cmake that you will need write. You can get inspiration from a number of FindXXX.cmake in the same directory. The result of find_package(RapidIO) is to define the variables RAPIDO_FOUND, RAPIDIO_INCLUDE_DIRS and RAPIDIO_LIBRARIES that you will need to add into the core/unix/CMakeLists.txt file.
I hope this helps. There is good documentation of CMake in the web.