gre-on-wg/Makefile

16 lines
437 B
Makefile
Raw Permalink 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
install -m 0755 -o root -g root -d /etc/gre-on-wg
2023-06-15 01:57:56 +02:00
.PHONY: install install-bin install-unit