-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 944 Bytes
/
Makefile
File metadata and controls
37 lines (26 loc) · 944 Bytes
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
BACKGROUND := grey
BACKGROUNDIMAGE = backgrounds/XVDR/$(BACKGROUND).png
WIDTH = $(shell echo $(shell identify -format "%w" $(BACKGROUNDIMAGE)) - 30 | bc)
HEIGHT = $(shell echo $(shell identify -format "%h" $(BACKGROUNDIMAGE)) - 30 | bc)
SOURCES := $(shell find picons -name "*png")
TARGETDIR := picons-xvdr-$(BACKGROUND)
COMPOSITE := composite -gravity center
CONVERT := convert
TOPDIR := $(shell pwd)
TARGETS = $(SOURCES:picons/%.png=$(TARGETDIR)/%.png)
all: composite link
dist: $(TARGETDIR).tar.gz
composite: $(TARGETDIR) $(TARGETS)
link:
-rm -f $(TARGETDIR)/1_*_0_0_0.png
cd $(TARGETDIR) && $(TOPDIR)/scripts/picons.sh
$(TARGETDIR).tar.gz: composite link
tar -zcf $@ $(TARGETDIR)
-rm -f $(TARGETDIR)/1_*_0_0_0.png
$(TARGETDIR):
mkdir -p $@
$(TARGETDIR)/%-scaled.png: picons/%.png
$(CONVERT) $< -resize $(WIDTH)x$(HEIGHT)\> $@
$(TARGETDIR)/%.png: $(TARGETDIR)/%-scaled.png
$(COMPOSITE) $< $(BACKGROUNDIMAGE) $@
rm -f $<