Blame view

img/Makefile 1.65 KB
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
1
  VECTORS=$(shell echo *.svg)
bd7909a0   Geoffrey PREUD'HOMME   Added two new spo...
2
  CUSTOM=mainBgPattern.png polyMap.png legoEducation.png
05eb2eae   Geoffrey PREUD'HOMME   Better images
3
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
4
5
  COMPRESSED=$(shell cd orig; echo *.jpg)
  MATRIXED=$(subst svg,png,$(VECTORS))
c7d2e510   Geoffrey PREUD'HOMME   Linked desc image...
6
7
  DESC=Descriptif Concept Activites
  DESC_JPG=$(addprefix desc,$(addsuffix .jpg,$(DESC)))
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
8
  
a166d9f6   Geoffrey PREUD'HOMME   Removed placeholder
9
  ALL=$(COMPRESSED) $(MATRIXED) $(DESC_JPG) $(CUSTOM)
daf147e9   Geoffrey PREUD'HOMME   Added background ...
10
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
11
12
13
  all: $(ALL)
  
  # CUSTOM
daf147e9   Geoffrey PREUD'HOMME   Added background ...
14
15
16
  mainBgPattern.png:
  	wget http://subtlepatterns.com/patterns/low_contrast_linen.png -O $@
  	convert -negate $@ $@
32187f6d   Geoffrey PREUD'HOMME   More blue
17
  	convert -channel B -evaluate multiply 1.2 $@ $@
b307959a   Geoffrey PREUD'HOMME   Optipng bg pattern
18
  	optipng -o7 $@
05eb2eae   Geoffrey PREUD'HOMME   Better images
19
  
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
20
  polyMap.png:
3a30fef5   Geoffrey PREUD'HOMME   Better remplaceme...
21
  	wget "https://maps.googleapis.com/maps/api/staticmap?center=50.6074998,3.1373338&zoom=16&size=640x200&scale=2&maptype=roadmap&markers=color:red%7Clabel:P%7C50.6074998,3.1373338" -O $@
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
22
23
  	optipng -o7 $@
  
bd7909a0   Geoffrey PREUD'HOMME   Added two new spo...
24
25
26
27
28
  legoEducation.png:
  	wget "http://mms.businesswire.com/bwapps/mediaserver/ViewMedia?mgid=325079&vid=5&download=1" -O $@
  	convert $@ -resize x200 $@
  	optipng -o7 $@
  
eb49c995   Geoffrey PREUD'HOMME   Created thumbnail...
29
30
31
32
33
34
35
36
37
38
  # DESCRIPTION
  descDescriptif.jpg: orig/descDescriptif.jpg
  	convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity center -composite -resize x400 -quality 90% $@
  
  descConcept.jpg: orig/descConcept.png
  	convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity center -composite -resize x400 -quality 90% $@
  
  descActivites.jpg: orig/descActivites.jpg
  	convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity east -composite -resize x400 -quality 90% $@
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
39
40
  # MATRIXED
  # $(MATRIXED): $(subst png,svg,$@)
05eb2eae   Geoffrey PREUD'HOMME   Better images
41
  %.png: %.svg
05eb2eae   Geoffrey PREUD'HOMME   Better images
42
43
44
  	convert -background none $< $@
  	optipng -o7 $@
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
45
46
  # COMPRESSED
  # $(COMPRESSED): orig/$@
05eb2eae   Geoffrey PREUD'HOMME   Better images
47
  %.jpg: orig/%.jpg
9a8ade67   Geoffrey PREUD'HOMME   Larger JPEG for H...
48
  	convert -resize x1200 -strip -interlace Plane -gaussian-blur 0.05 -quality 90% $< $@
05eb2eae   Geoffrey PREUD'HOMME   Better images
49
50
  
  clean:
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
51
  	rm -rf $(ALL)