1 ## SPDX-License-Identifier: GPL-2.0-only
3 # Makefile for coreboot paper.
4 # hacked together by Stefan Reinauer <stepan@openbios.org>
7 PDFLATEX
=pdflatex
-t a4
9 FIGS
=codeflow.pdf hypertransport.pdf
11 all: corebootPortingGuide.pdf
13 SVG2PDF
=$(shell command
-v svg2pdf
)
14 INKSCAPE
=$(shell command
-v inkscape
)
15 CONVERT
=$(shell command
-v convert
)
17 codeflow.pdf
: codeflow.svg
18 ifneq ($(strip $(SVG2PDF
)),)
20 else ifneq ($(strip $(INKSCAPE
)),)
21 inkscape
$< --export-pdf
=$@
22 else ifneq ($(strip $(CONVERT
)),)
26 hypertransport.pdf
: hypertransport.svg
27 ifneq ($(strip $(SVG2PDF
)),)
29 else ifneq ($(strip $(INKSCAPE
)),)
30 inkscape
$< --export-pdf
=$@
31 else ifneq ($(strip $(CONVERT
)),)
35 corebootPortingGuide.toc
: $(FIGS
) corebootBuildingGuide.
tex
36 # 2 times to make sure we have a current toc.
37 $(PDFLATEX
) corebootBuildingGuide.
tex
38 $(PDFLATEX
) corebootBuildingGuide.
tex
40 corebootPortingGuide.pdf
: $(FIGS
) corebootBuildingGuide.
tex corebootPortingGuide.toc
41 $(PDFLATEX
) corebootBuildingGuide.
tex
44 $(MAKE
) -f Makefile.sphinx html
47 $(MAKE
) -f Makefile.sphinx
clean
50 rm -f
*.aux
*.idx
*.log
*.toc
*.out
$(FIGS
)
53 rm -f corebootPortingGuide.pdf
56 $(MAKE
) -f Makefile.sphinx livehtml SPHINXOPTS
="$(SPHINXOPTS)"