[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to deal if source code and object file are in different director
Re: how to deal if source code and object file are in different directory?
Thu, 31 Aug 2006 01:37:32 -0600
On 8/31/06, Lin George <address@hidden> wrote:
I have two further questions,
1. when you say "a pattern rule" or "static pattern
rule", do you mean the built-in implicit rules of GNU
Nope. The terms "pattern rule" and "static pattern rule" are
described in the GNU make info pages. Please check there for the full
2. This line you suggested,
> $(OBJ_DIR): debug/%.o: src/%.c
I am confused about it. Since there are two : sign,
means two dependencies? In one line?
Nope. The presence of two colons is part of what makes this a static
pattern rule. That line specifies that for each file in the
$(OBJ_DIR) variable, make should try to match the pattern "debug/%.o"
against it. If that succeeds, then make should act like there's a
rule building that file with a dependency on the matching file