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; \
11 s/\\usepackage\[utf8\]{inputenc}/\\usepackage[utf8x]{inputenc}/; \
12 s/\\institute{\(.*\)}/\\institute[FIUBA]{\1}/'
18 PDFLATEXFLAGS := -halt-on-error -file-line-error
20 PLOTS := stw pause time mem
21 PROGS := bigarr conalloc concpu mcore rnddata sbtree split \
22 bh bisort em3d tsp voronoi dil
25 TEMPLITE := ./templite.py
33 imgs := $O/img/mark-sweep-0.pdf \
34 $(patsubst %.dot,$O/%.pdf,$(wildcard img/mark-sweep-*.dot)) \
35 $(patsubst %,$O/img/norm-hist-%.pdf,$(PLOTS))
37 # Verbosity flag (empty show nice messages, non-empty use make messages)
38 # When used internal, $V expand to @ is nice messages should be printed, this
39 # way it's easy to add $V in front of commands that should be silenced when
40 # displaying the nice messages.
41 override V := $(if $V,,@)
43 override V := $(if $(findstring s,$(MAKEFLAGS)),,$V)
45 targets := presentacion.pdf notas.pdf
51 $(if $V,@echo "$(PDFLATEX) $< > $@")
52 $V cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $(<F) $(if $V,> $@.log)
53 $V cd $O && $(PDFLATEX) $(PDFLATEXFLAGS) $(<F) $(if $V,>> $@.log)
56 presentacion.pdf: $(imgs)
58 $O/%.tex: %.rst $(R2B) $O/beamerthemeLuca.sty
59 $(if $V,@echo "$(R2B) $< > $@")
60 $V $(R2B) $(R2BFLAGS) $< | $(R2BFILTER) > $@
62 $O/notas.tex: R2BFLAGS += --shownotes=only
64 $O/img/%.pdf: img/%.dot
65 $(DOT) $(DOTFLAGS) -Tpdf -o $@ $<
67 $O/img/norm-hist-%.csv: img/raw-hist-%.csv
68 $(if $V,@echo "norm $< > $@")
69 $V $(AWK) -F, -v m=`cut -d, -f4 $< | $(STATS) '$$1' '%(max)s'` \
70 '{print $$1 "," $$2/m "," $$3/m "," $$4/m "," $$5/m}' \
73 $O/img/norm-hist-%.eps: $(patsubst %,$O/img/norm-hist-\%-%.csv,$(PROGS))
74 $(if $V,@echo "plot $< > $@")
75 $V $(TEMPLITE) "progs=($(patsubst %,'%'$(comma),$(PROGS))), " \
76 "files=($(patsubst %,'%'$(comma),$^))" \
77 < histogram-plot.tpl.gpi | $(GNUPLOT) > $@
79 $O/img/norm-hist-%.pdf: $O/img/norm-hist-%.eps
80 $(EPSTOPDF) --outfile=$@ $<
82 $O/img/%.pdf: img/%.pdf
96 __dummy := $(shell mkdir -p $O/img)