SCRIPT := gre-on-wg.sh SCRIPT_NAME := $(SCRIPT:.sh=) PREFIX ?= /usr/local PREFIX_UNIT ?= /etc install: install-bin install-unit install-bin: $(SCRIPT) install -D -m 0755 -o root -g root -T $< $(PREFIX)/bin/$(SCRIPT_NAME) install-unit: gre-on-wg.target gre-on-wg@.service install -D -m 0644 -o root -g root $^ $(PREFIX_UNIT)/systemd/system .PHONY: install install-bin install-unit