gre-on-wg/Makefile

15 lines
386 B
Makefile
Raw Normal View History

2023-06-15 01:05:12 +02:00
SCRIPT := gre-on-wg.sh
SCRIPT_NAME := $(SCRIPT:.sh=)
PREFIX ?= /usr/local
2023-06-15 01:57:56 +02:00
PREFIX_UNIT ?= /etc
2023-06-15 01:05:12 +02:00
2023-06-15 01:57:56 +02:00
install: install-bin install-unit
2023-06-15 01:05:12 +02:00
install-bin: $(SCRIPT)
2023-06-15 01:57:56 +02:00
install -D -m 0755 -o root -g root -T $< $(PREFIX)/bin/$(SCRIPT_NAME)
2023-06-15 01:05:12 +02:00
2023-06-15 01:57:56 +02:00
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