I have a makefile which looks like this .
DEFINES=-std=c++0x
INCS_GTK=-I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
Lets consider your /usr/local/lib/libYARP_OS.a
.
What you can do is, have -L/usr/local/lib/
in your makefile as one of the variables. And then you can have -lYARP_OS
appended to the LDLIBS.
-L is for path to the lib and -l is the lib name here libYARP_OS.a
will be passed as -lYARP_OS
.
On the command line you would do something like: gcc -o main main.c -L/usr/local/lib/ -lYARP_OS
. This should give you an idea.