[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with a directory name in a rule
From: |
Chris Cross |
Subject: |
Re: Problem with a directory name in a rule |
Date: |
Sat, 23 Oct 2010 14:52:29 -0400 |
> Vincent De Groote <address@hidden>
> I have already tried the rule $(OBJECTS_DIR)/%.o : $(SOURCES_DIR)/%.c
> makefile
>
> but this also doesn't work: it gives the sames results
>
>
> Any other idea ?
>
> Vincent De Groote
>
This is *very* interesting to me but I don't have the answer. I have only
made this sort of work by resorting to a static pattern rule where the
targets are all explicitly named:
# (typed from memory...)
CSRCS = foo.c bar.c
OBJS = $(addprefix, $(OBJDIR), $(CSRCS:.c=.o))
$(OBJS): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
But what I'd rather have is an implicit rule (the targets aren't explicit)
with a "build dir" path. I don't if it can be done...
Chris