#
# A template to build one infection example
#

$(TEVWH_TMP)/${PROJECT}/${ENTRY}${INFECTION}/infector: \
	$(TEVWH_PRE)/one_step_closer/cc.sh \
	$(TEVWH_OUT)/one_step_closer/${INFECTION}/infection.inc \
	src/${PROJECT}/${PROJECT}.c \
	$(${PROJECT}_cc_deps)
	$(TEVWH_PRE)/one_step_closer/cc.sh \
		${PROJECT} ${ENTRY} ${INFECTION} \
		src/${PROJECT}/${PROJECT}.c \
	> $(TEVWH_OUT)/${PROJECT}/${ENTRY}${INFECTION}/cc 2>&1
$(TEVWH_TMP)/${PROJECT}/${ENTRY}${INFECTION}/$(TEVWH_NAME_SH)_infected: \
	$(TEVWH_TMP)/${PROJECT}/${ENTRY}${INFECTION}/infector \
	$(TEVWH_PRE)/one_step_closer/infect.sh
	$(TEVWH_PRE)/one_step_closer/infect.sh \
		${PROJECT} ${ENTRY} ${INFECTION} \
		> $(TEVWH_OUT)/${PROJECT}/${ENTRY}${INFECTION}/infect 2>&1
$(TEVWH_OUT)/${PROJECT}/test-${ENTRY}${INFECTION}.sh: \
	$(TEVWH_PRE)/one_step_closer/mktest.sh \
	$(TEVWH_PRE)/one_step_closer/test.sh
	$(TEVWH_PRE)/one_step_closer/mktest.sh $@ \
		< $(TEVWH_PRE)/one_step_closer/test.sh
$(TEVWH_OUT)/${PROJECT}/test-${ENTRY}${INFECTION}: \
	$(TEVWH_TMP)/${PROJECT}/${ENTRY}${INFECTION}/$(TEVWH_NAME_SH)_infected \
	$(TEVWH_OUT)/${PROJECT}/test-${ENTRY}${INFECTION}.sh
	-$(TEVWH_OUT)/${PROJECT}/test-${ENTRY}${INFECTION}.sh > $@ 2>&1
