#---*- Makefile -*-------------------------------------------------------
#$Author: saulius $
#$Date: 2019-03-07 15:33:31 +0000 (Thu, 07 Mar 2019) $
#$Revision: 184 $
#$URL: svn+ssh://saulius-grazulis.lt/home/saulius/svn-repositories/makefiles/run_coms_simple/Makelocal-run_coms_simple $
#------------------------------------------------------------------------

COMS   = ${wildcard *.com}
LOGS   = ${COMS:%.com=%.log}
DEPEND = ${COMS:%.com=.%.d}

#------------------------------------------------------------------------------

.PHONY: all run clean cleanAll distclean

all: run

include ${DEPEND}

run: ${LOGS}

#------------------------------------------------------------------------------

%.log: %.com
	./$< 2>&1 | tee $@

.%.d: %.com
	mkcomdepend $< > $@

#------------------------------------------------------------------------------

clean:
	rm -f ${LOGS}

cleanAll distclean: clean
	rm -f ${DEPEND}
	rm -f ${CLEAN_FILES}
