There is a difference between linking static libraries and shared libraries. Here is a sample from a Makefile:
LIBS=-lm -lGL -lGLU
gcc -c openglbk_0/cube.c $(INCS)
gcc -o cube cube.o $(AUXLIBS) $(LIBS)
@echo "done cube build"
Static lib usually end with .a, shared libs tend to use the .so naming convention. Shared libs are prefixed with '-l', and a libfile name 'libGL' is used as '-lGL' (note: 'lib' is omitted in the usage). Static libs are simply defined by their pathname.