Index: doc/theses/mike_brooks_MMath/Makefile
===================================================================
--- doc/theses/mike_brooks_MMath/Makefile	(revision 1a9592ab2c5ab78d6f8e4f15a70830b749327133)
+++ doc/theses/mike_brooks_MMath/Makefile	(revision 9d84a88524d9d250bf27c611df5488b5f2b2552e)
@@ -8,5 +8,6 @@
 PicSRC = ${notdir ${wildcard ${Pictures}/*.png}}
 DemoSRC = ${notdir ${wildcard ${Programs}/*-demo.cfa}}
-PgmSRC = ${notdir ${wildcard ${Programs}/*.cfa}}
+PgmSRC = ${notdir ${wildcard ${Programs}/*}}
+RunPgmSRC = ${notdir ${wildcard ${Programs}/*.run.*}}
 BibSRC = ${wildcard *.bib}
 
@@ -14,5 +15,5 @@
 BibLIB = .:../../bibliography			# common citation repository
 
-MAKEFLAGS = --no-print-directory # --silent
+#MAKEFLAGS = --no-print-directory # --silent
 VPATH = ${Build} ${Pictures} ${Programs} # extra search path for file names used in document
 
@@ -20,16 +21,25 @@
 BASE = ${basename ${DOCUMENT}}			# remove suffix
 
+DemoTex = ${DemoSRC:%.cfa=${Build}/%.tex} 
+RunPgmExe = ${addprefix ${Build}/,${basename ${basename ${RunPgmSRC}}}}
+RunPgmOut = ${RunPgmExe:%=%.out}
+
 # Commands
 
 LaTeX = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error -output-directory=${Build}
 BibTeX = BIBINPUTS=${BibLIB} && export BIBINPUTS && bibtex
-CFA = cfa
+CFA = cfa -O0 -g
+CC  = gcc -O0 -g
+CXX = g++-11 --std=c++20 -O0 -g
 
 # Rules and Recipes
 
-.PHONY : all clean				# not file names
+.PHONY : all fragments_ran clean			# not file names
+.PRECIOUS : ${Build}/% ${Build}/%-demo      # don't delete intermediates
 .ONESHELL :
 
-all : ${DOCUMENT}
+all : fragments_ran ${DOCUMENT}
+
+fragments_ran : $(RunPgmOut)
 
 clean :
@@ -38,5 +48,5 @@
 # File Dependencies
 
-%.pdf : ${TeXSRC} ${DemoSRC:%.cfa=%.tex} ${PicSRC} ${PgmSRC} ${BibSRC} Makefile | ${Build}
+%.pdf : ${TeXSRC} ${DemoTex} ${PicSRC} ${PgmSRC} ${BibSRC} Makefile | ${Build}
 	${LaTeX} ${BASE}
 	${BibTeX} ${Build}/${BASE}
@@ -52,7 +62,20 @@
 
 %-demo.tex: %-demo | ${Build}
-	${Build}/$< > ${Build}/$@
+	$< > $@
 
-%-demo: %-demo.cfa
-	${CFA} $< -o ${Build}/$@
+${Build}/%-demo: ${Programs}/%-demo.cfa | ${Build}
+	${CFA} $< -o $@
 
+${Build}/%: ${Programs}/%.run.cfa | ${Build}
+	${CFA} $< -o $@
+
+${Build}/%: ${Programs}/%.run.c | ${Build}
+	${CC}  $< -o $@
+
+${Build}/%: ${Programs}/%.run.cpp | ${Build}
+	${CXX} -MMD $< -o $@
+
+${Build}/%.out: ${Build}/% | ${Build}
+	$< > $@
+
+-include ${Build}/*.d
