CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Don't try to be smart, use pkg-config instead to retrieve the information you need to compile and link your application against libcapsdriver.
To compile your code, just include its header:
And ask pkg-config what include path is required to find this header file.
pkg-config --cflags libcapsdriver
To link your application against libcapsdriver ask pkg-config as well. Use the output of this command to parametrize the linker:
pkg-config --libs libcapsdriver
--as-needed
is in use (which is the default in the CAPS universe).Don't invent your own Makefile to build your package. Use the autotools or something similar to manage your buildsystem.
For the autotools just use the PKG_CHECK_MODULES
m4 macro in your configure.ac
to get the information you need to use libcapsdriver:
PKG_CHECK_MODULES([LIBCAPSDRIVER], [libcapsdriver >= 1])
And then just refer this information in your Makefile.am
:
my_application_CPPFLAGS = \ @LIBCAPSDRIVER_CFLAGS@ my_application_LDADD = \ @LIBCAPSDRIVER_LIBS@
Refer libcapsdriver: API description for details.