#
#  GNUmakefile
#
#  This makefile is used to integrate the build of xpdf in the GNUstep
#  build process. It guarantees that xpdf is configured and then build.
#
#	Copyright (C) 2004 Stefan Kleine Stegemann <stefan@wms-network.de>
#
#	This Makefile is free software; you can redistribute it and/or
#	modify it under the terms of the GNU General Public License
#	as published by the Free Software Foundation; either version 2
#	of the License, or (at your option) any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#	See the GNU General Public License for more details.
#

include $(GNUSTEP_MAKEFILES)/common.make
include ../../config.make

ifdef LIB_FREETYPE_LIBS
   CONFIG_FT_LIBS_OPTION=--with-freetype2-library=$(LIB_FREETYPE_LIBS)
endif

ifdef LIB_FREETYPE_INCLUDES
   CONFIG_FT_INCLUDES_OPTION=--with-freetype2-includes=$(LIB_FREETYPE_INCLUDES)
endif

default: all

all: compile

configure: Makefile

Makefile:
	echo "configure xpdf ..."
	ADD_FT_INCLUDE_PATH=$(LIB_FREETYPE_ADD_INCLUDES)  ./configure --without-x \
	            $(CONFIG_FT_INCLUDES_OPTION) \
	            $(CONFIG_FT_LIBS_OPTION) \
	            --without-t1 \
	            --without-libpaper

compile: configure
	$(MAKE) -f Makefile pdfkit

distclean: configure
	$(MAKE) -f Makefile distclean

clean: configure
	$(MAKE) -f Makefile clean

install:




