POWEROFF_PATH ?= $(shell which poweroff) COUNTDOWN_SECS ?= 10 CFLAGS := -std=c99 -pedantic -Wall -Wextra \ -DPOWEROFF_PATH="\"$(POWEROFF_PATH)\"" \ -DCOUNTDOWN_SECS=$(COUNTDOWN_SECS) poweroff_guard: poweroff_guard.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o poweroff_guard poweroff_guard.c install: poweroff_guard install poweroff_guard /usr/local/sbin/ mkdir -p /usr/local/share/man/man8 install poweroff_guard.8 /usr/local/share/man/man8/ clean: rm -f poweroff_guard all: poweroff_guard