-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
34 lines (32 loc) · 994 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
33
34
# Definição de variáveis
SOURCE = main
LATEX = pdflatex
BIBTEX = bibtex
MAKEINDEX = makeindex
GHOSTSCRIPT = gs
# Compila o código fonte
all:
@echo "Compilando arquivos..."
$(LATEX) $(SOURCE).tex
$(MAKEINDEX) $(SOURCE).idx
$(BIBTEX) $(SOURCE).aux
$(LATEX) $(SOURCE).tex
$(LATEX) $(SOURCE).tex
$(LATEX) $(SOURCE).tex
@echo "Comprimindo o arquivo pdf..."
@$(GHOSTSCRIPT) -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-sOutputFile=$(SOURCE)_compressed.pdf \
$(SOURCE).pdf
@echo "Terminado."
# Remove arquivos temporários
clean:
@echo "Limpando arquivos temporarios..."
@find . -type f -iname "*.aux" -delete
@find . -type f -iname "*.log" -delete
@find . -type f -iname "*.fdb_latexmk" -delete
@find . -type f -iname "*.*~" -delete
@rm -f *.pdf *.bak *.ps *.l* *.idx *.bbl *.brf *.glo *.dvi *.toc *.blg *.ilg *.ind *.out *.wsp *.fls *.synctex*
@echo "Terminado."