1## Process this file with automake to produce Makefile.in
2
3# makefile to generate the spec document from sources
4# requires transfig and pdflatex
5
6docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
7
8built_docs = Theora.pdf
9
10if BUILD_SPEC
11doc_DATA = $(built_docs)
12endif
13
14SPEC_SRCS = spec.tex spec.bib
15
16FIG_SRCS = pic-frame.fig hilbert-mb.fig hilbert-block.fig xifish.fig \
17           superblock.fig macroblock.fig raster-block.fig reference-frames.fig \
18           pixel444.fig pixel422.fig pixel420.fig idct.fig fdct.fig \
19           pic_even.fig pic_even_odd.fig pic_odd.fig pic_odd_even.fig \
20           lflim.fig
21
22FIG_TEXS = $(FIG_SRCS:.fig=.tex)
23FIG_AUXS = $(FIG_SRCS:.fig=.aux)
24FIG_PDFS = $(FIG_SRCS:.fig=.pdf)
25
26# add any native-pdf figures here
27FIG_OBJS = $(FIG_PDFS)
28
29EXTRA_DIST = $(built_docs) $(SPEC_SRCS) $(FIG_SRCS) ltablex.sty
30
31if BUILD_SPEC
32# latex three times is the charm with references
33# long tables require the .aux file to start from scratch
34Theora.pdf : $(SPEC_SRCS) $(FIG_OBJS) vp3huff.tex spec.bib
35	-$(RM) spec.aux
36	pdflatex -interaction nonstopmode spec.tex
37	bibtex spec.aux
38	pdflatex -interaction nonstopmode spec.tex
39	pdflatex -interaction nonstopmode spec.tex
40	mv spec.pdf $@
41else
42Theora.pdf :
43        echo "*** Warning: Missing tools; $@ will not be built."
44endif
45
46vp3huff.tex : vp3huff
47	./vp3huff > $@
48
49noinst_PROGRAMS = vp3huff
50vp3huff_SOURCES = vp3huff.c
51
52figures : $(FIG_OBJS)
53
54# rules to generate latex and pdf versions of the xfig figures
55.fig.tex:
56	fig2dev -L latex $< $@
57
58.fig.pdf:
59	fig2dev -L pdf -p 0 $< $@
60
61SUFFIXES = .fig .tex .pdf
62
63# clean targets
64clean-local:
65	-$(RM) $(FIG_TEXS)
66	-$(RM) $(FIG_AUXS)
67	-$(RM) $(FIG_PDFS)
68	-$(RM) vp3huff
69	-$(RM) vp3huff.tex
70	-$(RM) vp3huff.aux
71	-$(RM) spec.aux
72	-$(RM) spec.log
73	-$(RM) spec.lof
74	-$(RM) spec.lot
75	-$(RM) spec.out
76	-$(RM) spec.bbl
77	-$(RM) spec.blg
78	-$(RM) spec.toc
79
80maintainer-clean-local:
81	-$(RM) $(built_docs)
82
83maintainerclean: maintainer-clean
84