We need to tell ${CC} about b.o explicitly.
ok?
-Scott
P.S. How was BSD $> or GNU $^ or an equivalent *not* standardized as
an automatic variable? I get that it isn't a silver bullet, but in
the relatively common "let's take several <X> and make a <Y>" case it
is extremely useful and totally missing from the portable syntax.
Index: make.1
===================================================================
RCS file: /cvs/src/usr.bin/make/make.1,v
retrieving revision 1.127
diff -u -p -r1.127 make.1
--- make.1 4 Jul 2018 14:11:49 -0000 1.127
+++ make.1 30 Jan 2019 19:45:15 -0000
@@ -464,7 +464,7 @@ from sources a.c and b.c, with header fi
${CC} ${CFLAGS} -c $<
prog: a.o b.o
- ${CC} ${CFLAGS} -o $@ a.o
+ ${CC} ${CFLAGS} -o $@ a.o b.o
a.o b.o: a.h