blob: 836b6e5f87374c5c3f8972de5bcee3b6c9de8821 [file] [log] [blame]
Martin Rothbfdb4892022-10-28 22:25:02 -06001## SPDX-License-Identifier: GPL-2.0-only
Stefan Reinauer37414ca2003-11-22 15:15:47 +00002#
Uwe Hermannd2a5a5a2009-04-18 14:18:20 +00003# Makefile for coreboot paper.
Stefan Reinauer37414ca2003-11-22 15:15:47 +00004# hacked together by Stefan Reinauer <stepan@openbios.org>
5#
6
7PDFLATEX=pdflatex -t a4
8
9FIGS=codeflow.pdf hypertransport.pdf
10
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020011all: corebootPortingGuide.pdf
Stefan Reinauer37414ca2003-11-22 15:15:47 +000012
Uwe Hermann67ee8f82009-05-12 14:24:25 +000013SVG2PDF=$(shell which svg2pdf)
14INKSCAPE=$(shell which inkscape)
15CONVERT=$(shell which convert)
Stefan Reinauer37414ca2003-11-22 15:15:47 +000016
Stefan Reinauerebf25892009-04-21 21:45:11 +000017codeflow.pdf: codeflow.svg
Uwe Hermann67ee8f82009-05-12 14:24:25 +000018ifneq ($(strip $(SVG2PDF)),)
Stefan Reinauerebf25892009-04-21 21:45:11 +000019 svg2pdf $< $@
Uwe Hermann67ee8f82009-05-12 14:24:25 +000020else ifneq ($(strip $(INKSCAPE)),)
21 inkscape $< --export-pdf=$@
22else ifneq ($(strip $(CONVERT)),)
23 convert $< $@
24endif
Stefan Reinauer37414ca2003-11-22 15:15:47 +000025
Stefan Reinauerebf25892009-04-21 21:45:11 +000026hypertransport.pdf: hypertransport.svg
Uwe Hermann67ee8f82009-05-12 14:24:25 +000027ifneq ($(strip $(SVG2PDF)),)
Stefan Reinauerebf25892009-04-21 21:45:11 +000028 svg2pdf $< $@
Uwe Hermann67ee8f82009-05-12 14:24:25 +000029else ifneq ($(strip $(INKSCAPE)),)
30 inkscape $< --export-pdf=$@
31else ifneq ($(strip $(CONVERT)),)
32 convert $< $@
33endif
Stefan Reinauer37414ca2003-11-22 15:15:47 +000034
Martin Roth4b18a922017-06-03 20:16:01 -060035corebootPortingGuide.toc: $(FIGS) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000036 # 2 times to make sure we have a current toc.
Martin Roth4b18a922017-06-03 20:16:01 -060037 $(PDFLATEX) corebootBuildingGuide.tex
38 $(PDFLATEX) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000039
Martin Roth4b18a922017-06-03 20:16:01 -060040corebootPortingGuide.pdf: $(FIGS) corebootBuildingGuide.tex corebootPortingGuide.toc
41 $(PDFLATEX) corebootBuildingGuide.tex
Stefan Reinauer37414ca2003-11-22 15:15:47 +000042
Jonathan Neuschäfer5e48c752018-04-19 16:23:56 +020043sphinx:
44 $(MAKE) -f Makefile.sphinx html
45
46clean-sphinx:
47 $(MAKE) -f Makefile.sphinx clean
48
49clean: clean-sphinx
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020050 rm -f *.aux *.idx *.log *.toc *.out $(FIGS)
Stefan Reinauer37414ca2003-11-22 15:15:47 +000051
52distclean: clean
Jonathan Neuschäferbdebc892018-09-25 23:15:16 +020053 rm -f corebootPortingGuide.pdf
Tom Hiller651b11b2018-08-18 19:20:16 -040054
55livesphinx:
Patrick Georgi0cd93662019-01-28 19:23:40 +010056 $(MAKE) -f Makefile.sphinx livehtml SPHINXOPTS="$(SPHINXOPTS)"