summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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