aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/Makefile
blob: db843b83a6c343a3f6bed34d1ee9dee0373421df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
TEX := xelatex
TEXARGS := -halt-on-error -interaction=nonstopmode -shell-escape=1

SOURCES := \
	Fading.tex \
	Fading.bib \
	\
	tex/docmacros.sty \
	tex/docstyle.sty \
	tex/preamble.tex \
	tex/titlepage.tex \
	\
	chapters/introduction.tex \
	chapters/theory.tex \
	chapters/implementation.tex \
	chapters/conclusions.tex \
	\
	figures/tikz/overview.tex \
	figures/tikz/psk-constellation.tex \
	figures/tikz/qam-modulator.tex \
	figures/tikz/qam-constellation.tex \
	figures/tikz/multipath-sketch.tex \
	figures/tikz/multipath-impulse-response.tex \
	figures/tikz/multipath-frequency-response-plots.tex \
	figures/tikz/tapped-delay-line.tex \
	figures/tikz/ring-of-scattering-objects.tex \
	figures/tikz/rayleigh-rice-pdf-plots.tex \
	figures/tikz/packet-frame.tex \
	figures/tikz/qpsk-sim-constellations-static.tex \
	figures/tikz/qpsk-sim-constellations-static-symb.tex \
	figures/tikz/qpsk-sim-constellations-static-symb-NLOS.tex \
	figures/tikz/qpsk-sim-constellations-static-symb-vec.tex \
	figures/tikz/qpsk-sim-constellations-dynamic.tex\
	figures/tikz/qpsk-sim-constellations-dynamic-exp-NLOS-5.tex\
	figures/tikz/qpsk-sim-constellations-without-effects.tex\


DATA := \
	figures/data/multipath_frequency_response.dat \
	figures/data/qpsk_sim_constellations_static.dat \
	figures/data/qpsk_sim_constellations_static_symb.dat \
	figures/data/qpsk_sim_constellations_static_symb_NLOS.dat \
	figures/data/qpsk_sim_constellations_static_symb_vec.dat \
	figures/data/qpsk_sim_constellations_dynamic.dat\
	figures/data/qpsk_sim_constellations_dynamic_exp_NLOS_5.dat\
	figures/data/qpsk_sim_constellations_without_effects.dat \
	figures/data/rice_pdf.dat


# Get the main file from the file
MAIN := $(shell sed -ne 's/^.*\!TeX root =\(.*\)$$/\1/ p' $(SOURCES))
PDF  := $(patsubst %.tex, %.pdf, $(MAIN))

ifeq ($(strip $(MAIN)),)
MAIN := $(error Failed to identify TeX root, try adding \
	`% !TeX root = <filename>` to your main tex file)
endif

.PHONY: all
all: $(PDF)

%.dat: %.py
	/usr/bin/env python3 $<

%.pdf: %.tex $(SOURCES) $(DATA)
	$(TEX) $(TEXARGS) $<
	# bibliography
	biber $(basename $(MAIN))
	$(TEX) $(TEXARGS) $<
	# embed fonts
	# gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dEmbedAllFonts=true -sOutputFile=$@_font_embedded.pdf -f $@

.PHONY: clean cleanall
clean:
	@rm -vf *.aux *.aue *.lof *.log *.lot *.fls *.out *.toc *.fmt *.fot *.cb *.cb2 .*.lb *.dvi *.xdv *-converted-to.* *.bbl *.bcf *.blg *-blx.aux *-blx.bib *.run.xml *.fdb_latexmk *.synctex *.synctex\(busy\) *.synctex.gz *.synctex.gz\(busy\) *.pdfsync *.alg *.loa acs-*.bib *.thm *.nav *.pre *.snm *.vrb *.soc *.cut *.cpt *.spl *.ent *.lox *.mf *.acn *.acr *.glg *.glo *.gls *.glsdefs *.lzo *.lzs *.lol *.auxlock *.figlist
	@rm -vf tex/*.aux
	@rm -vf chapters/*.aux

cleanall: clean
	@rm -vf $(PDF)

.PHONY: continuous
continuous:
	ls $(SOURCES) | entr -d make