forked from luxtorpeda-dev/luxtorpeda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (37 loc) · 1.13 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 build clean install user-install user-uninstall
tool_dir = luxtorpeda
tool_dir_dev = luxtorpeda-dev
ifeq ($(origin XDG_DATA_HOME), undefined)
data_home := ${HOME}/.local/share
else
data_home := ${XDG_DATA_HOME}
endif
PREFIX := /usr/local
GODOT := ~/.distrobox/steam/.local/share/Steam/steamapps/common/Godot\ Engine/godot.x11.opt.tools.64
install_dir = $(DESTDIR)/$(PREFIX)/share/steam/compatibilitytools.d/$(tool_dir)
dev_install_dir = $(data_home)/Steam/compatibilitytools.d/$(tool_dir_dev)
build:
cargo install cargo-post
GODOT=$(GODOT) TARGET=$(MAKECMDGOALS) cargo post build
release:
cargo install cargo-post
GODOT=$(GODOT) TARGET=$(MAKECMDGOALS) VERSION=$(version) cargo post build --release
clean:
cargo clean
rm -rf $(tool_dir)
rm -f $(tool_dir).tar.xz
rm -rf godot-build
$(tool_dir): \
release
echo "Packaging complete"
$(tool_dir).tar.xz: $(tool_dir)
echo "Archiving complete"
install: $(tool_dir)
mkdir -p $(install_dir)
cp -av $(tool_dir)/* $(install_dir)/
user-install: \
build
mkdir -p $(dev_install_dir)
cp -av $(tool_dir)/* $(dev_install_dir)/
user-uninstall:
rm -rf $(dev_install_dir)