SOURCES = \ main.esh \ common.esh \ tokens.esh \ backend/main.esh \ backend/codegen.esh \ frontend/main.esh \ frontend/parser.esh \ frontend/lexer.esh OBJECTS = $(SOURCES:.esh=.sh) all: eshtrans .SUFFIXES: .SUFFIXES: .esh .sh clean: rm -f eshtrans $(OBJECTS) eshtrans: $(OBJECTS) Makefile cat $(OBJECTS) >$@ printf 'main "$${@}"\n' >>$@ chmod a+x $@ $(OBJECTS): Makefile .esh.sh: cp $< $@