use LDFLAGS and LIBS properly, and allow dependencies to provide LDFLAGS if needed...