summaryrefslogtreecommitdiff
path: root/Makefile
blob: ef8b3478000fc5ee639082686f13d3cdadd284f8 (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
46
47
48
49
50
TARGETS=index.html game.html


clean:
	rm -f $(TARGETS)

all: $(TARGETS)


%.html: %.html.coffee
	(sh -c "coffee $< >$@.new" && mv $@.new $@ && touch -r $< $@) || rm -f $@

%.js: %.coffee
	coffee -bc $<

%.stripped.png: %.png
	convert -strip -colorspace sRGB $< -colorspace sRGB $@

%.pamfix.png: %.png
	(pngtopnm|pnmtopng) <$< >$@ || rm -f $@

%.pnmfix.pnm: %.png
	pngtopnm -alpha <$< >$@.alpha.png
	pngtopnm <$< >$@

%.pnmfix.png: %.pnmfix.pnm
	pnmtopng -alpha $<.alpha.png <$< >$@

# %.out.bmp: %.png
# 	pngtopnm <$< |ppmtobmp >$@ || rm -f $@
# %.png: %.in.bmp
# 	bmptoppm $< |pnmtopng >$@ || rm -f $@

# %.out.ppm: %.png
# 	pngtopnm <$< >$@ || rm -f $@
# %.png: %.in.ppm
# 	pnmtopng <$< >$@ || rm -f $@

%_8X.png: %.pnmfix.png
	convert -interpolate integer -scale 800 $< -format BMP2 $@
%_6X.png: %.pnmfix.png
	convert -interpolate integer -scale 600 $< -format BMP2 $@
%_5X.png: %.pnmfix.png
	convert -interpolate integer -scale 500 $< -format BMP2 $@
%_4X.png: %.pnmfix.png
	convert -interpolate integer -scale 400 $< -format BMP2 $@
%_3X.png: %.pnmfix.png
	convert -interpolate integer -scale 300 $< -format BMP2 $@
%_2X.png: %.pnmfix.png
	convert -interpolate integer -scale 200 $< -format BMP2 $@