Mail Archives: djgpp/1998/09/01/04:30:39
On Mon, 31 Aug 1998, Jesús Martín Oya wrote:
> MAKEDEPEND = gcc -MM -MG $(EXTRAINCLUDES) -I$(ARIESINC)
[snip]
> $(ODIR)/%.d: $(SDIR)/%.c
> -@if [ ! -d $(ODIR) ]; then mkdir -p $(ODIR); fi
> @$(MAKEDEPEND) $^ | $(FILTER) > $@
Using these rules, when $MAKEDEPEND is run, GCC doesn't know that the
object file will be in $ODIR, since you don't tell that. You only
tell GCC to do that in the compilation command line, by rules like
this:
> $(ODIR)/%.o: $(SDIR)/%.c
> $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
But this rule isn't used by $MAKEDEPEND.
You need to either change the definition of MAKEDEPEND, or add some
more magic to your Sed filter.
- Raw text -