help-make
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Issues with compiling dependent objects
From
:
Garrett Cooper
Subject
:
Issues with compiling dependent objects
Date
:
Wed, 28 May 2008 10:02:55 -0700
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
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
Issues with compiling dependent objects
,
Garrett Cooper
<=
Re: Issues with compiling dependent objects
,
Garrett Cooper
,
2008/05/28
Re: Issues with compiling dependent objects
,
Garrett Cooper
,
2008/05/28
Re: Issues with compiling dependent objects
,
Philip Guenther
,
2008/05/28
Re: Issues with compiling dependent objects
,
Garrett Cooper
,
2008/05/29
Re: Issues with compiling dependent objects
,
Garrett Cooper
,
2008/05/30
Message not available
Re: Issues with compiling dependent objects
,
Philip Guenther
,
2008/05/30
Prev by Date:
Linux EL 4.0 GNU Make throws SIGCHLD
Next by Date:
Re: Issues with compiling dependent objects
Previous by thread:
Linux EL 4.0 GNU Make throws SIGCHLD
Next by thread:
Re: Issues with compiling dependent objects
Index(es):
Date
Thread