SRCDIR=.. VPATH=$(SRCDIR) SOURCE=$(SRCDIR)/A.IN $(SRCDIR)/MixEd.ext $(SRCDIR)/lower.x $(SRCDIR)/upper.X all: ci cs # Case insensitive targets ci: a.out mixed.out # Case sensitive targets cs: lower.out upper.out cs: Hello HELLO # Begin case-insensitive rules prep:: touch $(SRCDIR)/A.IN touch $(SRCDIR)/MixEd.ext %.out: %.in cp $< $@ mixed.out: mixed.ext cp $< $@ # Begin case-sensitive rules prep:: touch $(SRCDIR)/lower.x touch $(SRCDIR)/upper.X %.out: %.x @echo Using lower-case rule cp $< $@ %.out: %.X @echo Using upper-case rule cp $< $@ Hello: @echo $@ HELLO: @echo $@ clean: rm -f *.out distclean: clean rm -f $(SOURCE)