Message ID | 20180622221946.10987-14-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jun 22, 2018 at 03:19:44PM -0700, Bart Van Assche wrote: > According to the GNU make documentation, the syntax for pattern rules > is as follows: > > <target pattern>+: <source pattern> > <rule> That's because this is a static pattern rule: https://www.gnu.org/software/make/manual/html_node/Static-Usage.html So calling this a fix isn't accurate :) I'll fold this change into the change adding the C++ program. > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > --- > src/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/Makefile b/src/Makefile > index 612282d14af8..d7ae832fc4fd 100644 > --- a/src/Makefile > +++ b/src/Makefile > @@ -13,7 +13,7 @@ all: $(TARGETS) > clean: > rm -f $(TARGETS) > > -$(TARGETS): %: %.c > +%: %.c > $(CC) -Wall -o $@ $(CPPFLAGS) $(CFLAGS) $^ > > .PHONY: all clean > -- > 2.17.1 >
diff --git a/src/Makefile b/src/Makefile index 612282d14af8..d7ae832fc4fd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,7 @@ all: $(TARGETS) clean: rm -f $(TARGETS) -$(TARGETS): %: %.c +%: %.c $(CC) -Wall -o $@ $(CPPFLAGS) $(CFLAGS) $^ .PHONY: all clean
According to the GNU make documentation, the syntax for pattern rules is as follows: <target pattern>+: <source pattern> <rule> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)