-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (25 loc) · 929 Bytes
/
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
PROGRAM = textview-editor.py
RESOURCES = textview-editor.menu.ui \
textview-editor.menu.ja_JP.ui textview-editor.ja_JP.json
prefix ?= /usr/local
bindir = $(prefix)/bin
applicationsdir = $(prefix)/share/applications
icondir = $(prefix)/share/icons/hicolor/96x96/apps
resourcedir = $(prefix)/share/$(patsubst %.py,%,$(PROGRAM))
all:
install:
install -d $(bindir)
install $(PROGRAM) $(bindir)/$(patsubst %.py,%,$(PROGRAM))
install -d $(applicationsdir)
install $(patsubst %.py,%.desktop,$(PROGRAM)) $(applicationsdir)
install -d $(icondir)
install $(patsubst %.py,%.png,$(PROGRAM)) $(icondir)
install -d $(resourcedir)
install $(RESOURCES) $(resourcedir)
uninstall:
rm $(bindir)/$(patsubst %.py,%,$(PROGRAM))
rm $(applicationsdir)/$(patsubst %.py,%.desktop,$(PROGRAM))
rm $(icondir)/$(patsubst %.py,%.png,$(PROGRAM))
rm $(addprefix $(resourcedir)/,$(RESOURCES))
rmdir $(resourcedir)
.PHONY: all install uninstall