-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (23 loc) · 732 Bytes
/
makefile
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
######################################################
# LaTeX Project Makefile
# Create by LeoMao
# Use latexmk, xelatex, asymptote
######################################################
MAINFILE = template
JOBNAME = template
SRCPATH = ./
FIGPATH = ./images
TEX = latexmk
TEXFLAG = -xelatex -synctex=1 -interaction=nonstopmode -use-make
ASY = asy
ASYFLAG = -f pdf
TEXFILES = $(shell find $(SRCPATH) -type f -name '*.tex')
ASYFILES = $(shell find $(FIGPATH) -type f -name '*.asy')
.PHONY: $(JOBNAME).pdf clean
all: $(JOBNAME).pdf
$(JOBNAME).pdf: $(MAINFILE).tex $(TEXFILES) $(ASYFILES)
$(TEX) $(TEXFLAG) -jobname=$(JOBNAME) $(MAINFILE).tex
$(FIGPATH)%.asy:
$(ASY) $(ASYFLAG) $@
clean:
latexmk -CA $(JOBNAME).fdb_latexmk