I have a makefile like this:
------------------------------
$(LIBBAR): ../lib/libbar.a
$(MAKE) -C ../lib libbar.a
$(LIBFAR): ../lib/libfar.a
$(MAKE) -C ../lib libfar.a
LIBS_foo := $(LIBBAR)
LIBS_boo := $(LIBFAR)
%: %.c $(LIBS_%)
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) $(LIBS_$@)
------------------------------
This allows me to include libbar.a in foo and libfar.a in boo.
Unfortunately I can't figure out how to get the prereq working. I want
foo and boo to rebuild when libbar.a and libfar.a are updated.
Can this be done with pattern rules?
--
Nate Straz [EMAIL PROTECTED]
sgi, inc http://www.sgi.com/
Linux Test Project http://ltp.sf.net/
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make