1 srcdir := . 2 3 test: foo.o bar.o 4 echo linking $@ from $< 5 6 foo.o: $(srcdir)/foo.c 7 echo compiling $@ from $< 8 bar.o: $(srcdir)/bar.c 9 echo compiling $@ from $< 10 11 $(srcdir)/foo.c: 12 echo source $@ 13 14 bar.c: 15 echo source $@ 16