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