summaryrefslogtreecommitdiff
path: root/design/Makefile
blob: 887e16fa87c74e5d2f637bad512d0abe076a1abe (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
SOURCE=preamble.tex
TARGET=designdokument
FLAGS=-halt-on-error -file-line-error -c-style-errors
#PNGs := $(patsubst %.png,%.eps, $(wildcard *.png))
JPGs := $(patsubst %.jpg,%.eps, $(wildcard *.jpg))
FIGs := $(patsubst %.fig,%.eps, $(wildcard *.fig))
TEXs := *.tex widgets/*.tex #$(patsubst %.fig,%.eps, $(wildcard *.fig))
.PHONY =dvi ps pdf mpost clean cleanall

all: dvi ps pdf

dvi: $(TARGET).dvi
ps: $(TARGET).ps
pdf: $(TARGET).pdf

$(TARGET).dvi: $(JPGs) $(FIGs) $(TEXs)
	latex $(FLAGS) -jobname $(TARGET) $(SOURCE)
	latex $(FLAGS) -jobname $(TARGET) $(SOURCE)

$(TARGET).ps: $(TARGET).dvi
	dvips -t a4 $(TARGET).dvi -o

$(TARGET).pdf: $(JPGs) $(FIGs) $(TEXs)
	pdflatex $(FLAGS) -jobname $(TARGET) $(SOURCE)
	pdflatex $(FLAGS) -jobname $(TARGET) $(SOURCE)

clean:
	rm -f \#*
	rm -f *~
	rm -f *.log
	rm -f *.toc
	rm -f *.aux
	rm -f $(TARGET).dvi
	rm -f $(TARGET).ps
	rm -f $(TARGET).pdf
	rm -f *.eps

%.eps: %.jpg
	convert $< $@

%.eps: %.png
	convert $< $@

%.eps: %.fig
	fig2dev -L eps $< $@