summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2010-09-23 00:12:48 +0200
committerMichael Stapelberg <michael@stapelberg.de>2010-09-23 00:12:48 +0200
commitc3f7fc4994cb7ae77cb6aa38e90500164f0b5dbd (patch)
tree6adeffcc4a5fcc82389816c8632abafafdd06bf9 /Makefile
parentaa05cd73a77057fab43e04740259d0736729c731 (diff)
port support for xdg basedir and some makefile fixes from i3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
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