2023-01-01 20:16:16 +02:00
|
|
|
export CARGO_TARGET_DIR ?= ./target
|
2025-05-18 11:51:41 +03:00
|
|
|
export CARGO_NET_GIT_FETCH_WITH_CLI ?= true
|
2023-11-25 11:12:50 -05:00
|
|
|
DESTDIR ?= /
|
|
|
|
|
PREFIX ?= /usr/local
|
2023-01-01 20:16:16 +02:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: build-release
|
2023-01-01 20:16:16 +02:00
|
|
|
build-release:
|
2023-12-09 21:12:53 +02:00
|
|
|
cargo build -p lact --release
|
2024-11-08 21:04:02 +02:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: build-debug
|
2024-11-08 21:04:02 +02:00
|
|
|
build-debug:
|
|
|
|
|
cargo build -p lact
|
2026-07-03 18:11:18 +03:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: build-release-headless
|
2023-12-09 21:12:53 +02:00
|
|
|
build-release-headless:
|
2025-06-21 10:00:33 +03:00
|
|
|
cargo build -p lact --release --no-default-features --features=nvidia
|
2026-07-03 18:11:18 +03:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: install-resources
|
2024-11-08 21:04:02 +02:00
|
|
|
install-resources:
|
2023-11-25 11:12:50 -05:00
|
|
|
install -Dm644 res/lactd.service $(DESTDIR)$(PREFIX)/lib/systemd/system/lactd.service
|
2025-04-04 21:38:19 +03:00
|
|
|
install -Dm644 res/io.github.ilya_zlobintsev.LACT.desktop $(DESTDIR)$(PREFIX)/share/applications/io.github.ilya_zlobintsev.LACT.desktop
|
2026-01-24 09:37:18 -05:00
|
|
|
install -Dm644 res/io.github.ilya_zlobintsev.LACT.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/512x512/apps/io.github.ilya_zlobintsev.LACT.png
|
2025-04-04 21:38:19 +03:00
|
|
|
install -Dm644 res/io.github.ilya_zlobintsev.LACT.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/io.github.ilya_zlobintsev.LACT.svg
|
|
|
|
|
install -Dm644 res/io.github.ilya_zlobintsev.LACT.metainfo.xml $(DESTDIR)$(PREFIX)/share/metainfo/io.github.ilya_zlobintsev.LACT.metainfo.xml
|
2026-07-10 23:00:34 +03:00
|
|
|
install -Dm644 res/io.github.ilya_zlobintsev.LACT.policy $(DESTDIR)$(PREFIX)/share/polkit-1/actions/io.github.ilya_zlobintsev.LACT.policy
|
2023-01-01 20:16:16 +02:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: install
|
2024-11-08 21:04:02 +02:00
|
|
|
install: install-resources
|
|
|
|
|
install -Dm755 target/release/lact $(DESTDIR)$(PREFIX)/bin/lact
|
2026-07-03 18:11:18 +03:00
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: install-debug
|
2024-11-08 21:04:02 +02:00
|
|
|
install-debug: install-resources
|
|
|
|
|
install -Dm755 target/debug/lact $(DESTDIR)$(PREFIX)/bin/lact
|
|
|
|
|
|
2025-05-26 22:45:52 +03:00
|
|
|
.PHONY: uninstall
|
2023-01-01 20:16:16 +02:00
|
|
|
uninstall:
|
2023-11-25 11:12:50 -05:00
|
|
|
rm $(DESTDIR)$(PREFIX)/bin/lact
|
|
|
|
|
rm $(DESTDIR)$(PREFIX)/lib/systemd/system/lactd.service
|
2025-04-04 21:38:19 +03:00
|
|
|
rm $(DESTDIR)$(PREFIX)/share/applications/io.github.ilya_zlobintsev.LACT.desktop
|
2026-01-24 09:37:18 -05:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/pixmaps/io.github.ilya_zlobintsev.LACT.png
|
|
|
|
|
rm $(DESTDIR)$(PREFIX)/share/icons/hicolor/512x512/apps/io.github.ilya_zlobintsev.LACT.png
|
2025-04-04 21:38:19 +03:00
|
|
|
rm $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/io.github.ilya_zlobintsev.LACT.svg
|
|
|
|
|
rm $(DESTDIR)$(PREFIX)/share/metainfo/io.github.ilya_zlobintsev.LACT.metainfo.xml
|
2026-07-10 23:00:34 +03:00
|
|
|
rm $(DESTDIR)$(PREFIX)/share/polkit-1/actions/io.github.ilya_zlobintsev.LACT.policy
|
2026-07-03 18:11:18 +03:00
|
|
|
|
|
|
|
|
.PHONY: update-vulkan-schema
|
|
|
|
|
update-vulkan-schema:
|
|
|
|
|
curl -o lact-daemon/vulkan_schema.json https://schema.khronos.org/vulkan/profiles-0.8-latest.json
|
|
|
|
|
|
|
|
|
|
.PHONY: update-nvidia-headers
|
|
|
|
|
update-nvidia-headers:
|
|
|
|
|
cd lact-daemon/include/nvidia && ./update_kernel_files.sh
|