From 675db4bbb646ff51cc3ecc8ba7d587670872580a Mon Sep 17 00:00:00 2001 From: Arthur Williams Date: Sun, 19 Sep 2021 01:49:56 -0700 Subject: Make statusbar optional (#95) libXft and libfontconfig are now optional dependencies which can be disabled via `HAVE_LIBFONTS=0`. Disabling them means disabling the statusbar. This also does not search for freetype2 header if disabled. Co-authored-by: NRK --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-54-g00ecf