Maybe I'm missing your question... but it looks like right at that link you provided there are instructions you need to compile as a .so
for Linux/Mac platforms. Then you can use the links from Mac:
To compile as a Mac dynamic library (.dylib).
Build Instructions
...
Mac OS X:
Change to the mac/ directory and run make.
To build the Test GUI:
On Linux and Mac, run make from the hidtest/ directory. Make sure to first install fox-toolkit as >described in README.txt
Then the README itself tells you what prerequisites there are to build for mac, and how to generate the final shared object library:
Prerequisites:
---------------
Mac:
On Mac, you will need to install Fox-Toolkit if you wish to build
the Test GUI. There are two ways to do this, and each has a slight
complication. Which method you use depends on your use case.
If you wish to build the Test GUI just for your own testing on your
own computer, then the easiest method is to install Fox-Toolkit
using ports: sudo port install fox
If you wish to build the TestGUI app bundle to redistribute to
others, you will need to install Fox-toolkit from source. This is
because the version of fox that gets installed using ports uses the
ports X11 libraries which are not compatible with the Apple X11
libraries. If you install Fox with ports and then try to distribute
your built app bundle, it will simply fail to run on other systems.
To install Fox-Toolkit manually, download the source package from
http://www.fox-toolkit.org, extract it, and run the following from
within the extracted source: ./configure && make && make install
And how to generate the .so:
Building HIDAPI into a shared library on Unix Platforms:
On Unix-like systems such as Linux, FreeBSD, Mac, and even Windows,
using Mingw or Cygwin, the easiest way to build a standard
system-installed shared library is to use the GNU Autotools build
system. If you checked out the source from the git repository, run
the following:
./bootstrap ./configure make make install <----- as root, or
using sudo
If you downloaded a source package (ie: if you did not run git clone),
you can skip the ./bootstrap step.
./configure can take several arguments which control the build. The
two most likely to be used are: --enable-testgui Enable build of
the Test GUI. This requires Fox toolkit to be installed.
Instructions for installing Fox-Toolkit on each platform are in the
Prerequisites section above.
--prefix=/usr Specify where you want the output headers and
libraries to be installed. The example above will put the headers in
/usr/include and the binaries in /usr/lib. The default is to
install into /usr/local which is fine on most systems.
So you should be able to just follow those instructions but modify the .dylib
extension and add the build flags: -dynamiclib
and -fPIC