Replace full library names with -L commands and -llib-name pairs. This way it resembles what autotools produce and additionally -l can not be used with GNU linker and full paths (as it prepends "lib" to such arguments).