17jl/Makefile

48 lines
928 B
Makefile

PROJECTNAME=Jauslin_Lebowitz_2017
LIBS=$(notdir $(wildcard libs/*))
FIGS=$(notdir $(wildcard figs/*.fig))
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME))
all: $(PROJECTNAME)
$(PROJECTNAME): $(LIBS) $(FIGS)
pdflatex -file-line-error $@.tex
pdflatex -file-line-error $@.tex
pdflatex -synctex=1 $@.tex
libs: $(LIBS)
$(LIBS):
ln -fs libs/$@ ./
figs: $(FIGS)
$(FIGS):
make -C figs/$@
ln -fs figs/$@/*.pdf ./
clean-aux:
rm -f $(addsuffix .aux, $(PROJECTNAME))
rm -f $(addsuffix .log, $(PROJECTNAME))
rm -f $(addsuffix .out, $(PROJECTNAME))
clean-libs:
rm -f $(LIBS)
clean-figs:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean; )
rm -f $(notdir $(wildcard figs/*.fig/*.pdf))
clean-figs-aux:
$(foreach fig,$(addprefix figs/, $(FIGS)), make -C $(fig) clean-aux; )
clean-tex:
rm -f $(PDFS) $(SYNCTEXS)
clean: clean-aux clean-tex clean-libs clean-figs