SBCL ?= sbcl PREFIX ?= $(HOME)/.local BINDIR ?= $(PREFIX)/bin SYSTEMD_USER_DIR ?= $(HOME)/.config/systemd/user BIN := nextcloud-niri .PHONY: all build test install uninstall clean all: build build: $(BIN) $(BIN): nextcloud-niri.asd build.lisp src/*.lisp $(SBCL) --non-interactive \ --load build.lisp \ --eval '(ql:quickload :nextcloud-niri :silent t)' \ --eval '(sb-ext:save-lisp-and-die "$(BIN)" :toplevel (function nextcloud-niri:main) :executable t :compression t)' test: $(SBCL) --non-interactive \ --load build.lisp \ --eval '(ql:quickload :nextcloud-niri/tests :silent t)' \ --eval '(unless (nextcloud-niri.tests:run-all-tests) (sb-ext:exit :code 1))' install: build install -d "$(BINDIR)" install -m 755 "$(BIN)" "$(BINDIR)/$(BIN)" install -d "$(SYSTEMD_USER_DIR)" install -m 644 systemd/nextcloud-niri.service "$(SYSTEMD_USER_DIR)/nextcloud-niri.service" @echo "" @echo "Installed $(BINDIR)/$(BIN) and $(SYSTEMD_USER_DIR)/nextcloud-niri.service" @echo "Next steps:" @echo " 1. nextcloud-niri login https://your-nextcloud.example.com" @echo " 2. nextcloud-niri add ~/Documents/Notes Documents/Notes" @echo " 3. systemctl --user daemon-reload && systemctl --user enable --now nextcloud-niri.service" @echo " 4. Add waybar/config.snippet.jsonc and waybar/style.snippet.css to ~/.config/waybar/" uninstall: rm -f "$(BINDIR)/$(BIN)" "$(SYSTEMD_USER_DIR)/nextcloud-niri.service" clean: rm -f "$(BIN)"