I find I\'m writing a lot of Makefiles that could be cleaned up with the use of n-tuple lists. But I can\'t find any way to do this properly (and cleanly). So far I
You can use default rules for a set of files with the same extension as in for compiling each c file to an o. Of course you are not restricted to any special file extensions. For compiling a set of .c files you could do it like this:
OBJS = foo.o bar.o baz.o
OUT = myprog
all: $(OBJS)
$(SILENT) echo "LD $@"
$(SILENT) $(CPP) -o $(OUT) $^ $(LDFLAGS)
%.o: %.c
$(SILENT) echo "CC $<"
$(SILENT) $(CC) $(CCOPTS) -o $@ -c $<