.PHONY: all install uninstall SYSTEMD_DIR ?= /usr/lib/systemd/system UNITS := $(wildcard *.path) $(wildcard *.service) $(wildcard *.target) INSTALLED_UNITS := $(UNITS:%=$(SYSTEMD_DIR)/%) all: @echo "available makefile targets: 'install' 'uninstall'" install: install -Dm644 -t $(SYSTEMD_DIR) $(UNITS) systemctl enable --now nergennet.target uninstall: systemctl disable --now nergennet.target rm $(INSTALLED_UNITS)