SOURCES = \
	main.esh \
	flat-profile.esh
OBJECTS = $(SOURCES:.esh=.sh)

all: eshprof

.SUFFIXES:
.SUFFIXES: .esh .sh

clean:
	rm -f eshprof $(OBJECTS)

eshprof: $(OBJECTS) Makefile
	cat $(OBJECTS) >$@
	printf 'main "$${@}"\n' >>$@
	chmod a+x $@

$(OBJECTS): Makefile

.esh.sh:
	cp $< $@