SOURCES = \ main.esh \ link.esh \ eshrt.esh OBJECTS = $(SOURCES:.esh=.sh) all: eshld .SUFFIXES: .SUFFIXES: .esh .sh clean: rm -f eshld $(OBJECTS) eshld: $(OBJECTS) Makefile cat $(OBJECTS) >$@ printf 'main "$${@}"\n' >>$@ $(OBJECTS): Makefile .esh.sh: cp $< $@