From e671882a3b64a83dce98d84cdd58e2f48ed83fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 14 Jul 2009 00:28:51 +0300 Subject: Ensure only one image library is used. --- Makefile | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3d2d7e7..564625a 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,8 @@ STRIP=strip # Text2Skin if you use Imlib2! (That's why I actually implemented ImageMagick) # TBD: is this still true? -# Define only one of these, leave others commented out. -HAVE_IMAGEMAGICK=1 -#HAVE_GRAPHICSMAGICK=1 -#HAVE_IMLIB2=1 # not recommended +# External image lib to use: imagemagick, graphicsmagick, imlib2 or none +IMAGELIB = imagemagick # DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING @@ -70,23 +68,19 @@ ifdef DEVELOPMENT_FEATURES DEFINES += -DDEVELOPMENT_FEATURES endif -ifdef HAVE_IMLIB2 - DEFINES += -DHAVE_IMLIB2 - INCLUDES += $(shell pkg-config --cflags imlib2) - LIBS += $(shell pkg-config --libs imlib2) - OBJS += quantize.o -endif - -ifdef HAVE_IMAGEMAGICK +ifeq ($(IMAGELIB), imagemagick) DEFINES += -DHAVE_IMAGEMAGICK INCLUDES += $(shell pkg-config --cflags ImageMagick++) LIBS += $(shell pkg-config --libs ImageMagick++) -endif - -ifdef HAVE_GRAPHICSMAGICK - DEFINES += -DHAVE_IMAGEMAGICK # yep, really HAVE_IMAGEMAGICK +else ifeq ($(IMAGELIB), graphicsmagick) + DEFINES += -DHAVE_IMAGEMAGICK # yep, really HAVE_IMAGEMAGICK here INCLUDES += $(shell pkg-config --cflags GraphicsMagick++) LIBS += $(shell pkg-config --libs GraphicsMagick++) +else ifeq ($(IMAGELIB), imlib2) + DEFINES += -DHAVE_IMLIB2 + INCLUDES += $(shell pkg-config --cflags imlib2) + LIBS += $(shell pkg-config --libs imlib2) + OBJS += quantize.o endif ifdef DEBUG -- cgit v1.2.3