-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
89 lines (66 loc) · 3.31 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
#!/usr/bin/make -f
# Makefile for Cadence #
# ---------------------- #
# Created by falkTX
#
PREFIX = /usr/local
DESTDIR =
LINK = ln -s
PYUIC ?= pyuic5
PYRCC ?= pyrcc5
# -----------------------------------------------------------------------------------------------------------------------------------------
all: RES UI
# -----------------------------------------------------------------------------------------------------------------------------------------
# Resources
RES: src/resources_rc.py
src/resources_rc.py: resources/resources.qrc
$(PYRCC) $< -o $@
# -----------------------------------------------------------------------------------------------------------------------------------------
# UI code
UI: src/ui_catia.py src/ui_settings_app.py
src/ui_%.py: resources/ui/%.ui
$(PYUIC) $< -o $@
# -----------------------------------------------------------------------------------------------------------------------------------------
clean:
rm -f *~ src/*~ src/*.pyc src/ui_*.py src/resources_rc.py
# -----------------------------------------------------------------------------------------------------------------------------------------
debug:
$(MAKE) DEBUG=true
# -----------------------------------------------------------------------------------------------------------------------------------------
install:
# Create directories
install -d $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/share/applications
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
install -d $(DESTDIR)$(PREFIX)/share/catia/jacklib
install -d $(DESTDIR)$(PREFIX)/share/catia/patchcanvas
# Install script files and binaries
install -m 755 \
data/catia \
$(DESTDIR)$(PREFIX)/bin/
# Install desktop files
install -m 644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications/
# Install icons
install -m 644 resources/16x16/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
install -m 644 resources/48x48/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/
install -m 644 resources/128x128/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
install -m 644 resources/256x256/catia.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/256x256/apps/
install -m 644 resources/scalable/catia.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
# Install main code
install -m 755 src/*.py $(DESTDIR)$(PREFIX)/share/catia/
install -m 755 src/jacklib/*.py $(DESTDIR)$(PREFIX)/share/catia/jacklib/
install -m 755 src/patchcanvas/*.py $(DESTDIR)$(PREFIX)/share/catia/patchcanvas/
# Adjust PREFIX value in script files
sed -i "s?X-PREFIX-X?$(PREFIX)?" \
$(DESTDIR)$(PREFIX)/bin/catia \
# -----------------------------------------------------------------------------------------------------------------------------------------
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/catia
rm -f $(DESTDIR)$(PREFIX)/share/applications/catia.desktop
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/*/apps/catia.png
rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/catia.svg
rm -rf $(DESTDIR)$(PREFIX)/share/catia