summaryrefslogtreecommitdiff
path: root/examples/Makefile
blob: 762fd9eb6c4e5f1d38d28a7710d39e549d78149c (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>' -unsharp 0.5x0.5 -quality 90 $< $@

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

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

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

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

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