blob: b4fe8df0abe6f4e11851c3d7c9ba1e1b66fa5278 [file] [log] [blame]
Stefan Reinauer37414ca2003-11-22 15:15:47 +00001#
Uwe Hermannd2a5a5a2009-04-18 14:18:20 +00002# Makefile for coreboot paper.
Stefan Reinauer37414ca2003-11-22 15:15:47 +00003# hacked together by Stefan Reinauer <stepan@openbios.org>
4#
5
6PDFLATEX=pdflatex -t a4
7
8FIGS=codeflow.pdf hypertransport.pdf
9
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020010all: corebootPortingGuide.pdf
Stefan Reinauer37414ca2003-11-22 15:15:47 +000011
Uwe Hermann67ee8f82009-05-12 14:24:25 +000012SVG2PDF=$(shell which svg2pdf)
13INKSCAPE=$(shell which inkscape)
14CONVERT=$(shell which convert)
Stefan Reinauer37414ca2003-11-22 15:15:47 +000015
Stefan Reinauerebf25892009-04-21 21:45:11 +000016codeflow.pdf: codeflow.svg
Uwe Hermann67ee8f82009-05-12 14:24:25 +000017ifneq ($(strip $(SVG2PDF)),)
Stefan Reinauerebf25892009-04-21 21:45:11 +000018 svg2pdf $< $@
Uwe Hermann67ee8f82009-05-12 14:24:25 +000019else ifneq ($(strip $(INKSCAPE)),)
20 inkscape $< --export-pdf=$@
21else ifneq ($(strip $(CONVERT)),)
22 convert $< $@
23endif
Stefan Reinauer37414ca2003-11-22 15:15:47 +000024
Stefan Reinauerebf25892009-04-21 21:45:11 +000025hypertransport.pdf: hypertransport.svg
Uwe Hermann67ee8f82009-05-12 14:24:25 +000026ifneq ($(strip $(SVG2PDF)),)
Stefan Reinauerebf25892009-04-21 21:45:11 +000027 svg2pdf $< $@
Uwe Hermann67ee8f82009-05-12 14:24:25 +000028else ifneq ($(strip $(INKSCAPE)),)
29 inkscape $< --export-pdf=$@
30else ifneq ($(strip $(CONVERT)),)
31 convert $< $@
32endif
Stefan Reinauer37414ca2003-11-22 15:15:47 +000033
Martin Roth4b18a922017-06-03 20:16:01 -060034corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000035 # 2 times to make sure we have a current toc.
Martin Roth4b18a922017-06-03 20:16:01 -060036 $(PDFLATEX) corebootBuildingGuide.tex
37 $(PDFLATEX) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000038
Martin Roth4b18a922017-06-03 20:16:01 -060039corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc
40 $(PDFLATEX) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000041
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020042sphinx:
43 $(MAKE) -f Makefile.sphinx html
44
45clean-sphinx:
46 $(MAKE) -f Makefile.sphinx clean
47
48clean: clean-sphinx
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020049 rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
Stefan Reinauer37414ca2003-11-22 15:15:47 +000050
51distclean: clean
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020052 rm -f corebootPortingGuide.pdf
Tom Hiller651b11b2018-08-18 19:20:16 -040053
54livesphinx:
Patrick Georgi0cd93662019-01-28 19:23:40 +010055 $(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)"