Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..eeb141d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+PROJECTNAME=Jauslin_Lebowitz_2017
+
+LIBS=$(patsubst libs/%, %, $(wildcard libs/*))
+FIGS=$(patsubst figs/%, %, $(wildcard figs/*))
+
+all: $(PROJECTNAME)
+
+$(PROJECTNAME): $(LIBS) $(FIGS)
+ pdflatex -file-line-error $(PROJECTNAME).tex
+ pdflatex $(PROJECTNAME).tex
+ pdflatex -synctex=1 $(PROJECTNAME).tex
+
+$(LIBS):
+ ln -fs libs/$@ ./
+
+$(FIGS):
+ make -C figs/$@
+ ln -fs figs/$@/*.pdf ./
+
+
+clean-aux:
+ rm -f $(PROJECTNAME).aux
+ rm -f $(PROJECTNAME).log
+ rm -f $(PROJECTNAME).out
+ rm -f $(PROJECTNAME).toc
+
+clean-libs:
+ rm -f $(LIBS)
+
+clean-tex:
+ rm -f $(PROJECTNAME).pdf
+ rm -f $(PROJECTNAME).synctex.gz
+
+clean-figs:
+ for fig in $(FIGS); do make -C figs/"$$fig" clean; done
+
+clean-figs-aux:
+ for fig in $(FIGS); do make -C figs/"$$fig" clean-aux; done
+
+clean: clean-aux clean-tex clean-libs clean-figs