summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk63
1 files changed, 53 insertions, 10 deletions
diff --git a/config.mk b/config.mk
index ffbecfd..5cad703 100644
--- a/config.mk
+++ b/config.mk
@@ -1,8 +1,26 @@
PACKAGE ?= feh
VERSION ?= ${shell git describe --dirty}
+app ?= 0
+curl ?= 1
+debug ?= 0
+exif ?= 0
+help ?= 0
+magic ?= 0
+mkstemps ?= 1
+verscmp ?= 1
+xinerama ?= 1
+
# Prefix for all installed files
PREFIX ?= /usr/local
+ICON_PREFIX ?= ${DESTDIR}${PREFIX}/share/icons
+
+# icons in /usr/share/local/icons (and other prefixes != /usr) are not
+# generally supported. So ignore PREFIX and always install icons into
+# /usr/share/icons if the user wants to install feh on their local machine.
+ifeq (${app},1)
+ ICON_PREFIX = /usr/share/icons
+endif
# Directories for manuals, executables, docs, data, etc.
main_dir = ${DESTDIR}${PREFIX}
@@ -12,16 +30,17 @@ 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
+desktop_dir = ${main_dir}/share/applications
+icon_dir = ${ICON_PREFIX}/hicolor
+48_icon_dir = ${icon_dir}/48x48/apps
+scalable_icon_dir = ${icon_dir}/scalable/apps
# default CFLAGS
CFLAGS ?= -g -O2
CFLAGS += -Wall -Wextra -pedantic
-curl ?= 1
-debug ?= 0
-help ?= 0
-xinerama ?= 1
-exif ?= 0
+# Settings for glibc >= 2.19 - may need to be adjusted for other systems
+CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE
ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL
@@ -33,9 +52,9 @@ endif
ifeq (${debug},1)
CFLAGS += -DDEBUG -O0
- MAN_DEBUG = . This is a debug build.
+ MAN_DEBUG = This is a debug build.
else
- MAN_DEBUG =
+ MAN_DEBUG = .
endif
ifeq (${help},1)
@@ -46,6 +65,22 @@ ifeq (${stat64},1)
CFLAGS += -D_FILE_OFFSET_BITS=64
endif
+ifeq (${mkstemps},1)
+ CFLAGS += -DHAVE_MKSTEMPS
+endif
+
+ifeq (${magic},1)
+ CFLAGS += -DHAVE_LIBMAGIC
+ LDLIBS += -lmagic
+ MAN_MAGIC = enabled
+else
+ MAN_MAGIC = disabled
+endif
+
+ifeq (${verscmp},1)
+ CFLAGS += -DHAVE_STRVERSCMP
+endif
+
ifeq (${xinerama},1)
CFLAGS += -DHAVE_LIBXINERAMA
LDLIBS += -lXinerama
@@ -57,11 +92,19 @@ endif
ifeq (${exif},1)
CFLAGS += -DHAVE_LIBEXIF
LDLIBS += -lexif
- MAN_EXIF = enabled
+ MAN_EXIF = available
+else
+ MAN_EXIF = not available
+endif
+
+ifeq (${inotify},1)
+ CFLAGS += -DHAVE_INOTIFY
+ MAN_INOTIFY = enabled
else
- MAN_EXIF = disabled
+ MAN_INOTIFY = disabled
endif
+MAN_DATE ?= ${shell date '+%B %d, %Y'}
# Uncomment this to use dmalloc
#CFLAGS += -DWITH_DMALLOC
@@ -69,4 +112,4 @@ endif
CFLAGS += -DPREFIX=\"${PREFIX}\" \
-DPACKAGE=\"${PACKAGE}\" -DVERSION=\"${VERSION}\"
-LDLIBS += -lm -lpng -lX11 -lImlib2 -lgiblib
+LDLIBS += -lm -lpng -lX11 -lImlib2