don't pass LDFLAGS when only performing compilation (-c)

This simplifies the compiler commands and suppresses warnings.
Merge pull request #123 from longjon/master

don't pass LDFLAGS when only performing compilation (-c)