summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>2020-09-09 16:50:02 +0000
committerTobias Klauser <tobias.klauser@gmail.com>2020-09-10 11:58:14 +0200
commit8b834cd6928c573866627f41eacf2525d6211060 (patch)
tree93e831bddea45388aa53d1513f3179d4fa8e7626 /Makefile
parente496036b592c7c6d1bc419b5683a6a25bf46e193 (diff)
llmnrd: create pid file when daemonizing, and remove it on exit
The path of the pid file is /run/llmnrd/pid by default but can be changed via the PIDFILE make variable. Fixes #18 Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b160b78..675535a 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,9 @@ else
GIT_VERSION =
endif
-CFLAGS_MIN := -W -Wall -DVERSION_STRING=\"v$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\"
+PIDFILE ?= /run/llmnrd/pid
+
+CFLAGS_MIN := -W -Wall -DVERSION_STRING=\"v$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -DPIDFILE=\"$(PIDFILE)\"
ifeq ($(DEBUG), 1)
CFLAGS_MIN += -g -DDEBUG
endif