--- a/pybooksrc/mapy.lyx
+++ b/pybooksrc/mapy.lyx
@@ -13260,7 +13260,7 @@
 \backslash
 includegraphics[width=0.2
 \backslash
-textwidth]{pics/arcs.eps} 
+textwidth]{pics/arcs.png}
 \end_layout
 
 \begin_layout Standard
@@ -13268,7 +13268,7 @@
 \backslash
 includegraphics[width=0.2
 \backslash
-textwidth]{pics/sawtooth.eps}
+textwidth]{pics/sawtooth.png}
 \end_layout
 
 \begin_layout Standard
@@ -13322,7 +13322,7 @@
 \backslash
 includegraphics[width=0.2
 \backslash
-textwidth]{pics/arcs.eps} 
+textwidth]{pics/arcs.png}
 \end_layout
 
 \begin_layout Standard
@@ -13331,7 +13331,7 @@
 \backslash
 includegraphics[width=0.2
 \backslash
-textwidth]{pics/sawtooth.eps}
+textwidth]{pics/sawtooth.png}
 \end_layout
 
 \begin_layout Standard
--- /dev/null
+++ b/pybooksrc/Makefile
@@ -0,0 +1,21 @@
+.SUFFIXES= .lyx .tex .pdf
+DESTDIR=
+
+all: mapy.pdf
+
+clean:
+	rm -f *~ *.tex *.aux *.log *.pdf *.toc pics/*.eps
+
+install:
+
+%.tex: %.lyx
+	tmpHome=$$(mktemp -d); \
+	HOME=$${tmpHome} lyx --export latex $<; \
+	rm -rf $${tmpHome}
+
+%.pdf: %.tex
+	pdflatex $<
+	logfile=$$(echo $< | sed 's/tex/log/'); \
+	while (grep  Warning $${logfile}| grep -iq run); do \
+	  pdflatex $<; \
+	done
