On Thu, 2 Feb 2017 20:08:04 +0000
Connor Lane Smith <cls_AT_lubutu.com> wrote:
> On 2 February 2017 at 19:54, Markus Wichmann
> <nullplan_AT_gmx.net> wrote:
> > GNU make style patsubst rules, i.e.
> >
> > %.o: %.c
> > $(CC) $(CFLAGS) -o $_AT_ $<
> >
> > Those are really useful.
>
> While GNU's syntax can be more general, that rule can be
> done in POSIX make:
>
> > .c.o:
> > $(CC) $(CFLAGS) -c $<
>
> Likewise,
>
> > .o:
> > $(CC) $(CFLAGS) $(LDFLAGS) -o $_AT_ $<
>
> cls
>
However, there are probably a lot of makefiles
in the white that uses %, and you cannot do
%.o: src/%.c
...
without %, unless you do a really ugly hack:
.SCCS_GET: cp src/$_AT_ $@
.c.o:
...
maandree
Received on Thu Feb 02 2017 - 21:13:28 CET