-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
91 lines (72 loc) · 2.35 KB
/
Makefile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
VERSION = 2.12.2.3
SHA256SUM = 249cb6f8a2f64a78758ef0c5987fccd8fa88334f4fd5c391bee0ea95219f0c62
PREFIX = $(DESTDIR)/usr
PTE_PREFIX = $(DESTDIR)/opt/pmmc/pte
STANDALONE = 0
INSTALL_BINARIES = \
install-bin \
install-bin-doc \
install-bin-doc-printable \
DESKTOP_FILES = \
linux/desktop/pmmc-pte-sei.desktop \
linux/desktop/pmmc-pte-sei-doc.desktop \
linux/desktop/pmmc-pte-sei-doc-printable.desktop \
INSTALL_DESKTOP_FILES = \
install-desktop \
install-desktop-doc \
install-desktop-doc-printable \
ICONS = \
icons/sei-16.png \
icons/sei-22.png \
icons/sei-24.png \
icons/sei-32.png \
icons/sei-36.png \
icons/sei-48.png \
icons/sei-64.png \
icons/sei-72.png \
icons/sei-96.png \
icons/sei-128.png \
icons/sei-192.png \
icons/sei-256.png
INSTALL_ICONS = \
install-icon-16 \
install-icon-22 \
install-icon-24 \
install-icon-32 \
install-icon-36 \
install-icon-48 \
install-icon-64 \
install-icon-72 \
install-icon-96 \
install-icon-128 \
install-icon-192 \
install-icon-256
build: $(ICONS) $(DESKTOP_FILES) linux/share/functions
ifeq ($(STANDALONE), 1)
install: install-main install-data install-doc
else
install: install-main
endif
install-main: $(INSTALL_BINARIES) $(INSTALL_ICONS) $(INSTALL_DESKTOP_FILES)
install -D -m 644 icons/sei.svg $(PREFIX)/share/icons/hicolor/scalable/apps/pmmc-pte-sei.svg
install -D -m 644 linux/share/functions $(PREFIX)/share/sei/functions
install-data: linux/share/functions
./sei-install-data.sh $(PTE_PREFIX)/sei
install-doc: linux/share/functions
./sei-install-doc.sh $(PTE_PREFIX)/doc/sei
clean:
rm -f icons/*.png linux/desktop/*.desktop linux/share/functions
install-icon-%: icons/sei-%.png
install -D -m 644 $< $(PREFIX)/share/icons/hicolor/$(patsubst sei-%,%,$(*F))x$(patsubst sei-%,%,$(*F))/apps/pmmc-pte-sei.png
install-desktop: linux/desktop/pmmc-pte-sei.desktop
install -D -m 644 $< $(PREFIX)/share/applications/$(<F)
install-desktop%: linux/desktop/pmmc-pte-sei%.desktop
install -D -m 644 $< $(PREFIX)/share/applications/$(<F)
install-bin: linux/bin/sei
install -D -m 755 $< $(PREFIX)/games/$(<F)
install-bin%: linux/bin/sei%
install -D -m 755 $< $(PREFIX)/games/$(<F)
icons/%.png: icons/sei.svg
rsvg-convert $< --width=$(patsubst sei-%,%,$(*F)) --height=$(patsubst sei-%,%,$(*F)) --format=png --output $@
linux/%: linux/%.in
sed -e "s/@VERSION@/$(VERSION)/g" -e "s/@SHA256SUM@/$(SHA256SUM)/g" < $< > $@