aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 45971dd..caf72f5 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ OPT_DEP_DEFAULT ?= 1
HAVE_INOTIFY ?= $(OPT_DEP_DEFAULT)
# optional dependencies, see README for more info
+HAVE_LIBFONTS ?= $(OPT_DEP_DEFAULT)
HAVE_LIBGIF ?= $(OPT_DEP_DEFAULT)
HAVE_LIBEXIF ?= $(OPT_DEP_DEFAULT)
HAVE_LIBWEBP ?= $(OPT_DEP_DEFAULT)
@@ -23,11 +24,16 @@ CFLAGS ?= -std=c99 -Wall -pedantic
# icons that will be installed via `make icon`
ICONS = 16x16.png 32x32.png 48x48.png 64x64.png 128x128.png
+inc_fonts_0 =
+inc_fonts_1 = -I/usr/include/freetype2 -I$(PREFIX)/include/freetype2
+
CPPFLAGS = -D_XOPEN_SOURCE=700 \
-DHAVE_LIBGIF=$(HAVE_LIBGIF) -DHAVE_LIBEXIF=$(HAVE_LIBEXIF) \
- -DHAVE_LIBWEBP=$(HAVE_LIBWEBP) \
- -I/usr/include/freetype2 -I$(PREFIX)/include/freetype2
+ -DHAVE_LIBWEBP=$(HAVE_LIBWEBP) -DHAVE_LIBFONTS=$(HAVE_LIBFONTS) \
+ $(inc_fonts_$(HAVE_LIBFONTS))
+lib_fonts_0 =
+lib_fonts_1 = -lXft -lfontconfig
lib_exif_0 =
lib_exif_1 = -lexif
lib_gif_0 =
@@ -37,9 +43,9 @@ lib_webp_1 = -lwebpdemux -lwebp
autoreload_0 = nop
autoreload_1 = inotify
# using += because certain *BSD distros may need to add additional flags
-LDLIBS += -lImlib2 -lX11 -lXft -lfontconfig \
+LDLIBS += -lImlib2 -lX11 \
$(lib_exif_$(HAVE_LIBEXIF)) $(lib_gif_$(HAVE_LIBGIF)) \
- $(lib_webp_$(HAVE_LIBWEBP))
+ $(lib_webp_$(HAVE_LIBWEBP)) $(lib_fonts_$(HAVE_LIBFONTS))
OBJS = autoreload_$(autoreload_$(HAVE_INOTIFY)).o commands.o image.o main.o options.o \
thumbs.o util.o window.o