summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk38
1 files changed, 29 insertions, 9 deletions
diff --git a/config.mk b/config.mk
index d2c96c4..b19a6df 100644
--- a/config.mk
+++ b/config.mk
@@ -11,23 +11,43 @@ bin_dir = ${main_dir}/bin
doc_dir = ${main_dir}/share/doc/feh
image_dir = ${main_dir}/share/feh/images
font_dir = ${main_dir}/share/feh/fonts
+example_dir = ${main_dir}/share/doc/feh/examples
# default CFLAGS
CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra -pedantic
-# Comment these out if you don't have libxinerama
-xinerama = -DHAVE_LIBXINERAMA
-xinerama_ld = -lXinerama
-
-# Uncomment this for debug mode
-# (Use feh -+ or feh --debug to see debug output)
-#CFLAGS += -DDEBUG
+curl ?= 1
+debug ?= 0
+xinerama ?= 1
+
+ifeq (${curl},1)
+ CFLAGS += -DHAVE_LIBCURL
+ LDLIBS += -lcurl
+ MAN_CURL = enabled
+else
+ MAN_CURL = disabled
+endif
+
+ifeq (${debug},1)
+ CFLAGS += -DDEBUG
+ MAN_DEBUG = . This is a debug build.
+else
+ MAN_DEBUG =
+endif
+
+ifeq (${xinerama},1)
+ CFLAGS += -DHAVE_LIBXINERAMA
+ LDLIBS += -lXinerama
+ MAN_XINERAMA = enabled
+else
+ MAN_XINERAMA = disabled
+endif
# Uncomment this to use dmalloc
#CFLAGS += -DWITH_DMALLOC
-CFLAGS += ${xinerama} -DPREFIX=\"${PREFIX}\" \
+CFLAGS += -DPREFIX=\"${PREFIX}\" \
-DPACKAGE=\"${PACKAGE}\" -DVERSION=\"${VERSION}\"
-LDLIBS += -lm -lpng -lX11 -lImlib2 -lgiblib ${xinerama_ld}
+LDLIBS += -lm -lpng -lX11 -lImlib2 -lgiblib