aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Whitehead <sam.everythingcomputers@gmail.com>2021-09-24 13:20:55 +0200
committerNRK <nrk@disroot.org>2021-09-24 13:27:22 +0200
commitaf98249b6886defcd9d456bd5a23082f9ec7f75f (patch)
treef8dadf0d874e983c73539f91fd8fc294ebb597c6 /Makefile
parent0e7ab7e5c369e61359951a66a4f02d8062d9a3a3 (diff)
downloadnsxiv-af98249b6886defcd9d456bd5a23082f9ec7f75f.tar.zst
Add animated webp support (#20)
Co-authored-by: NRK <nrk@disroot.org> Co-authored-by: Stein Gunnar Bakkeby <bakkeby@gmail.com> Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3b4ba0a..1bae33b 100644
--- a/Makefile
+++ b/Makefile
@@ -30,9 +30,15 @@ ifeq ($(HAVE_LIBGIF), 1)
else
HAVE_LIBGIF = 0
endif
+ifeq ($(HAVE_LIBWEBP), 1)
+ OPTIONAL_LIBS += -lwebpdemux -lwebp
+else
+ HAVE_LIBWEBP = 0
+endif
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
LDLIBS = -lImlib2 -lX11 -lXft -lfontconfig $(OPTIONAL_LIBS)
@@ -61,7 +67,7 @@ window.o: icon/data.h
config.mk:
@echo "GEN $@"
@echo "# 0 = disable, 1 = enable" > config.mk
- @for lib in exif gif; do \
+ @for lib in exif gif webp; do \
if echo "int main(){}" | $(CC) "-l$$lib" -o /dev/null -x c - 2>/dev/null ; then \
echo "HAVE_LIB$$lib=1" | tr '[:lower:]' '[:upper:]' >> config.mk ; \
fi \