6 R2BFLAGS := --halt=2 --lang es --codeblocks-use-pygments \
7 --input-encoding=utf-8 --output-encoding=utf-8 \
10 R2BFILTER := sed '/\\usepackage\[scaled=\.90\]{helvet}/d'
16 AAFIGFLAGS := --proportional
19 PDFLATEXFLAGS := -halt-on-error -file-line-error
21 PLOTS := stw pause time mem ncol
22 PROGS := bigarr conalloc concpu mcore rnddata sbtree split \
23 bh bisort em3d tsp voronoi dil
26 TEMPLITE := ./templite.py
33 imgs := $O/img/mark-sweep-0.pdf \
34 $(patsubst %.dot,$O/%.pdf,$(wildcard img/mark-sweep-*.dot)) \
36 $(patsubst %,$O/img/norm-hist-%.pdf,$(PLOTS))
38 presentacion.pdf: $O/presentacion.tex $(imgs)
39 @echo "$(PDFLATEX) $< > $@"
40 @cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $(<F) > $@.log
41 @cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $(<F) >> $@.log
44 $O/presentacion.tex: presentacion.rst $(R2B)
45 @echo "$(R2B) $< > $@"
46 @$(R2B) $(R2BFLAGS) $< | $(R2BFILTER) > $@
48 $O/img/%.pdf: img/%.dot
49 @echo "$(DOT) $< > $@"
50 @$(DOT) $(DOTFLAGS) -Tpdf -o $@ $<
51 @#pdftops mark-sweep-$i.pdf && ps2pdf14 mark-sweep-$i.ps && rm mark-sweep-$i.ps
53 $O/img/%.pdf: img/%.aafig
54 @echo "$(AAFIG) $< > $@"
55 @$(AAFIG) $(AAFIGFLAGS) -t pdf -o $@ $<
57 $O/img/norm-hist-%.csv: img/raw-hist-%.csv
59 @awk -F, -v m=`cut -d, -f4 $< | $(STATS) '$$1' '%(max)s'` \
60 '{print $$1 "," $$2/m "," $$3/m "," $$4/m "," $$5/m}' \
63 $O/img/norm-hist-%.eps: $(patsubst %,$O/img/norm-hist-\%-%.csv,$(PROGS))
65 @$(TEMPLITE) "progs=($(patsubst %,'%'$(comma),$(PROGS))), " \
66 "files=($(patsubst %,'%'$(comma),$^))" \
67 < histogram-plot.tpl.gpi | $(GNUPLOT) > $@
69 $O/img/norm-hist-%.pdf: $O/img/norm-hist-%.eps
70 @echo "$(EPSTOPDF) $< > $@"
71 @$(EPSTOPDF) --outfile=$@ $<
73 $O/img/%.pdf: img/%.pdf
77 $O/heap.pdf: AAFIGFLAGS += -s 1.4 -a 0.8
85 $(RM) presentacion.pdf
87 __dummy := $(shell mkdir -p $O/img)