Hi community,
CFLAGS remains in recipes for linking in examples in 6.14, this is inconsistent with 10.2. And in 10.2, can we spell out the recipes in complete, for example with $^ , $< , etc. , for compling and linking C programs: $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< ``` # 6.14: .EXTRA_PREREQS # https://www.gnu.org/software/make/manual/html_node/Special-Variables.html , myprog: myprog.o file1.o file2.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) myprog: myprog.o file1.o file2.o $(CC) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ $(filter-out $(CC),$^) $(LDLIBS) myprog: myprog.o file1.o file2.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) myprog: .EXTRA_PREREQS = $(CC) # 10.2 # https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html , $(CC) $(CPPFLAGS) $(CFLAGS) -c $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(CC) $(LDFLAGS) n.o $(LOADLIBES) $(LDLIBS) ```