how to modify the makefile to use foreign library?

I use gdal in my cuda application.
The cuda sample include a makefile and the file include the common.mk to set the compile and link environment.
But how to modify the makefile (or common.mk , more accurtely ) to use a foreign library like gdal?
I tried but failed.
Could anyone give me a example?
Thanks in advanced.