From 1bcc2bd1e450708b878e2a28f75d8b543b26d518 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 21 Sep 2011 15:37:46 +0200 Subject: build: configure pingu rundir from Makefile So we can override the default rundir without patching things --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7575be4..a580517 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,23 @@ TARGETS = mtu pingu pinguctl VERSION = 0.5 -CFLAGS ?= -g -CFLAGS += -DPINGU_VERSION=\"$(VERSION)\" -CFLAGS += -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 - prefix = /usr +localstatedir = /var +rundir = $(localstatedir)/run +pingustatedir = $(rundir)/pingu + BINDIR = $(prefix)/bin DESTDIR ?= INSTALL = install INSTALLDIR = $(INSTALL) -d +CFLAGS ?= -g +CFLAGS += -DPINGU_VERSION=\"$(VERSION)\" +CFLAGS += -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 +CFLAGS += -DDEFAULT_PIDFILE=\"$(pingustatedir)/pingu.pid\" +CFLAGS += -DDEFAULT_ADM_SOCKET=\"$(pingustatedir)/pingu.ctl\" + pingu_OBJS = \ icmp.o \ log.o \ @@ -54,7 +60,7 @@ pinguctl: $(pinguctl_OBJS) mtu: $(mtu_OBJS) install: $(TARGETS) - $(INSTALLDIR) $(DESTDIR)/$(BINDIR) + $(INSTALLDIR) $(DESTDIR)/$(BINDIR) $(DESTDIR)/$(pingustatedir) $(INSTALL) $(TARGETS) $(DESTDIR)/$(BINDIR) clean: -- cgit v1.2.3