diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-21 15:37:46 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-21 15:37:46 +0200 |
commit | 1bcc2bd1e450708b878e2a28f75d8b543b26d518 (patch) | |
tree | b8bcb938c50c6638a4fe5b4a905a1756d85b51a3 | |
parent | 9c73acd621249be32e89a657a12489e40e1a02fb (diff) | |
download | pingu-1bcc2bd1e450708b878e2a28f75d8b543b26d518.tar.bz2 pingu-1bcc2bd1e450708b878e2a28f75d8b543b26d518.tar.xz |
build: configure pingu rundir from Makefile
So we can override the default rundir without patching things
-rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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: |