Debian Codegraph @

eyesjunior/helpFiles/en/Makefile-images

raw
1 #! /usr/bin/make
2
3 # Makefile to convert svg, jpg and png files to PDF
4
5 SVGFILES = $(wildcard *.svg)
6 JPGFILES = $(wildcard *.jpg)
7 PNGFILES = $(wildcard *.png)
8 TARGETS = $(patsubst %.svg, %.pdf, $(SVGFILES)) \
9 $(patsubst %.jpg, %.pdf, $(JPGFILES)) \
10 $(patsubst %.png, %.pdf, $(PNGFILES))
11
12 all: $(TARGETS)
13
14 %.pdf: %.png
15 @echo "PNG -> $@"
16 gm convert $< -resize 960x720 -background white $@
17
18 %.pdf: %.jpg
19 @echo "JPG -> $@"
20 gm convert $< -resize 960x720 -background white $@
21
22
23 %.pdf: %.svg
24 @echo "SVG -> $@"
25 rsvg-convert -f pdf $< --width 960 -o $@
26
27 clean:
28 rm -f $(TARGETS)
29
30 .PHONY: all clean