From c3f7fc4994cb7ae77cb6aa38e90500164f0b5dbd Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 23 Sep 2010 00:12:48 +0200 Subject: port support for xdg basedir and some makefile fixes from i3 --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6ec32bd..526ec34 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,19 @@ +ifndef PREFIX + PREFIX=/usr +endif +ifndef SYSCONFDIR + ifeq ($(PREFIX),/usr) + SYSCONFDIR=/etc + else + SYSCONFDIR=$(PREFIX)/etc + endif +endif + CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare CFLAGS+=-g CFLAGS+=-std=gnu99 CFLAGS+=-pedantic -CFLAGS+=-DPREFIX=\"\" +CFLAGS+=-DSYSCONFDIR=\"$(SYSCONFDIR)\" CFLAGS+=-DVERSION=\"${GIT_VERSION}\" CFLAGS+=-Iinclude LDFLAGS+=-lconfuse -- cgit v1.2.3