-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (38 loc) · 1.86 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
.PHONY: all test build
PREFIX ?= /usr
LOCALE_LOCATION ?= /share/locale
all: .WAIT configure
shards build --release --debug $(CR_FLAGS) -s --link-flags='-Wl,--as-needed'
configure:
shards install
./bin/gi-crystal
#all: bindings build
#bindings:
# ./bin/gi-crystal --no-doc
build:
APP_LOCALE_LOCATION="$(PREFIX)$(LOCALE_LOCATION)" $(CRYSTAL_LOCATION)shards build -Dpreview_mt --no-debug
build_release:
APP_LOCALE_LOCATION="$(PREFIX)$(LOCALE_LOCATION)" $(CRYSTAL_LOCATION)shards build -Dpreview_mt --release --no-debug
test:
$(CRYSTAL_LOCATION)crystal spec -Dpreview_mt --order random
install:
install -D -m 0755 bin/myhotkeys $(DESTDIR)$(PREFIX)/bin/myhotkeys
install -D -m 0644 myhotkeys.desktop $(DESTDIR)$(PREFIX)/share/applications/io.github.mipmip.myhotkeys.desktop
install -D -m 0644 data/io.github.mipmip.myhotkeys.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/io.github.mipmip.myhotkeys.svg
# Settings schema
#install -D -m644 data/gschema.xml $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas/io.github.hugopl.myhotkeys.gschema.xml
# Data
#cp -r data/icons $(DESTDIR)$(PREFIX)/share/myhotkeys/
install -D -m0644 LICENSE $(DESTDIR)$(PREFIX)/share/licenses/myhotkeys/LICENSE
install -D -m0644 CHANGELOG.md $(DESTDIR)$(PREFIX)/share/doc/myhotkeys/CHANGELOG.md
gzip -9fn $(DESTDIR)$(PREFIX)/share/doc/myhotkeys/CHANGELOG.md
post-install:
gtk4-update-icon-cache --ignore-theme-index $(DESTDIR)$(PREFIX)/share/icons/hicolor
# glib-compile-schemas $(DESTDIR)$(PREFIX)/share/glib-2.0/schemas
#uninstall:
# rm -f $(DESTDIR)$(PREFIX)/bin/myhotkeys
# rm -f $(DESTDIR)$(PREFIX)/share/applications/io.github.hugopl.myhotkeys.desktop
# rm -f $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/io.github.hugopl.myhotkeys.svg
# rm -rf $(DESTDIR)$(PREFIX)/share/myhotkeys
# rm -rf $(DESTDIR)$(PREFIX)/share/licenses/myhotkeys
# rm -rf $(DESTDIR)$(PREFIX)/share/doc/myhotkeys