4e4991adbe9f69be136126ffbff371444fedee82
[coreboot.git] / documentation / Makefile
1 #
2 # Makefile for coreboot paper.
3 # hacked together by Stefan Reinauer <stepan@openbios.org>
4 #
5
6 PDFLATEX=pdflatex -t a4
7
8 FIGS=codeflow.pdf hypertransport.pdf
9
10 all: LinuxBIOS-AMD64.pdf 
11
12 SVG2PDF=$(shell which svg2pdf)
13 INKSCAPE=$(shell which inkscape)
14 CONVERT=$(shell which convert)
15
16 codeflow.pdf: codeflow.svg
17 ifneq ($(strip $(SVG2PDF)),)
18         svg2pdf $< $@
19 else ifneq ($(strip $(INKSCAPE)),)
20         inkscape $< --export-pdf=$@
21 else ifneq ($(strip $(CONVERT)),)
22         convert $< $@
23 endif
24
25 hypertransport.pdf: hypertransport.svg
26 ifneq ($(strip $(SVG2PDF)),)
27         svg2pdf $< $@
28 else ifneq ($(strip $(INKSCAPE)),)
29         inkscape $< --export-pdf=$@
30 else ifneq ($(strip $(CONVERT)),)
31         convert $< $@
32 endif
33
34 LinuxBIOS-AMD64.toc: $(FIGS) LinuxBIOS-AMD64.tex 
35         # 2 times to make sure we have a current toc.
36         $(PDFLATEX) LinuxBIOS-AMD64.tex
37         $(PDFLATEX) LinuxBIOS-AMD64.tex
38
39 LinuxBIOS-AMD64.pdf: $(FIGS) LinuxBIOS-AMD64.tex LinuxBIOS-AMD64.toc
40         $(PDFLATEX) LinuxBIOS-AMD64.tex
41
42 clean:
43         rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
44
45 distclean: clean
46         rm -f LinuxBIOS-AMD64.pdf
47