On Wed, May 28, 2008 at 10:02 AM, Garrett Cooper <[EMAIL PROTECTED]> wrote:
> Hi again, > > I'm having issues with compiling .a / .la (library archives), with > dependent objects (.o). For whatever reason I can't get the .a / .la archive > to be created unless the dirname for the library archive and the objects are > the same. > > # Makefile > > # $(CURDIR) is $(srcdir)/lib/ltp > LIB_TARGET := $(srcdir)/lib/libltp.a > MAKE_DEPS := $(patsubst %.c,%.o,$(wildcard *.c)) > MAKE_TARGETS := $(LIB_TARGET) > $(LIB_TARGET): $(MAKE_TARGET) > > # ------ > > # Master rule: > %.a: > ar -rc $@ $^ > > So the essential rule set should be: > > %.o: %.c > > $(srcdir)/lib/libltp.a: $(patsubst %.c,%.o,$(wildcard > $(srcdir)/lib/ltp/*.c)) > ar -rc $@ $^ > > But make refuses to do: > %.o: %.c > > I even inserted the implicit rule and make refuses to connect the dots... > > Furthermore, I just inserted $(CURDIR) in front of $(wildcard ...), and it > still refuses to do the right thing. > > Isn't this supposed to be evaluated automatically to the expected answer of > .c -> .o? > > Thanks, > -Garrett > Ok, apparently some monkey removed the implicit rules from execution. How do I get these back? -Garrett
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
