PAPER = weeding_security_bugs
LYX=lyx-qt

all: $(PAPER).pdf

%.tex: %.lyx
	 $(LYX) -e latex $<


%.ps: %.dvi
	dvips $<

%.pdf: %.ps
	ps2pdf $< $@

%.dvi: %.tex
	latex $<
#	bibtex $*
# bibtex modifica $1.aux asi que hay que generarlo primero con latex
#	latex $*
#	latex $*

clean:
	-rm -f *.aux *.toc *.log *.lof *.dvi *.ps *.bbl *.blg *.lot *~
	$(MAKE) -C slides clean

distclean: clean
	-rm -f $(PAPER).tex *.pdf
	$(MAKE) -C slides distclean

distclean: clean
	-rm -f $(PAPER).tex *.pdf
