I have a large makefile which builds several libraries, installs them, and then keeps on building objects which link against those installed libraries. My trouble is that I wan
How about this:
LIBS = foo bar blah # and so on LINKFLAGS = $(addprefix -l,$(LIBS)) LIBPATHS = $(patsubst %,/explicit/path/to/lib/lib%.so, $(LIBS)) $(myObject): $(localSrc) $(LIBPATHS) $(CXX) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ $(LINKFLAGS) $(LINKLIBS)