summaryrefslogtreecommitdiff
path: root/examples/Makefile
blob: 7c26813867cf67189d7a3da1f2711e82a75ea276 (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
images    := $(wildcard *.jpg)
slides    := $(addprefix gipfelweb/slides/, $(images))
thumbs    := $(addprefix gipfelweb/thumbs/, $(images))
positions := $(addprefix gipfelweb/gipfel/, $(addsuffix .pos, $(basename $(images))))
dumps     := $(addprefix gipfelweb/gipfel/, $(addsuffix .gipf, $(basename $(images))))
html      := $(addprefix gipfelweb/, $(addsuffix .html, $(basename $(images))))

all:
	echo "make gipfelweb - create a HTML based we of gipfel oriented"
	echo "images in the current directory."

gipfelweb: dirs $(slides) $(thumbs) $(dumps) $(html)

clean:
	rm -rf gipfelweb

dirs:
	mkdir -p gipfelweb/slides
	mkdir -p gipfelweb/thumbs
	mkdir -p gipfelweb/gipfel

gipfelweb/slides/%.jpg: %.jpg
	convert -resize '10000x600>' -quality 90 $< $@

gipfelweb/thumbs/%.jpg: %.jpg
	convert -resize '1000x150>' -quality 80 $< $@

gipfelweb/gipfel/%.pos: %.jpg
	gipfel -p $< > $@

gipfelweb/gipfel/%.gipf: gipfelweb/slides/%.jpg gipfelweb/gipfel/index.gipfel
	gipfel -v 0.02 -e gipfelweb/gipfel/index.gipfel $< > $@

gipfelweb/gipfel/index.gipfel: $(positions)
	cat $(positions) > gipfelweb/gipfel/index.gipfel

gipfelweb/%.html: gipfelweb/slides/%.jpg gipfelweb/gipfel/%.gipf $(thumbs)
	gipfel2html $* > $@