# Copyright (C) 2000-2012 by George Williams
# Copyright (C) 2012 by Barry Schwartz
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

ACLOCAL_AMFLAGS = -I m4

# Ignore files installed
GITIGNOREFILES = \
	.gitmodules \
	INSTALL \
	aclocal.m4 \
	config/ \
	m4/libtool.m4 \
	m4/ltargz.m4 \
	m4/ltoptions.m4 \
	m4/ltsugar.m4 \
	m4/ltversion.m4 \
	m4/lt~obsolete.m4 \
	'**/*.gcno' \
	'**/*.gcda'

@CODE_COVERAGE_RULES@

#--------------------------------------------------------------------------

AM_CPPFLAGS =
AM_LDFLAGS =

BUILT_SOURCES =
EXTRA_DIST =
CLEANFILES =
MOSTLYCLEANFILES =
MAINTAINERCLEANFILES=config.h.in
DISTCLEANFILES=config.h stamp-h1

include_HEADERS =
noinst_LTLIBRARIES =
lib_LTLIBRARIES =
EXTRA_LTLIBRARIES =

include $(top_srcdir)/mk/layout.am

#--------------------------------------------------------------------------

SUBDIRS = inc Unicode gutils fontforge

if GRAPHICAL_USER_INTERFACE
SUBDIRS += gdraw
endif GRAPHICAL_USER_INTERFACE

SUBDIRS += fontforgeexe

if PYTHON_EXTENSION
SUBDIRS += pyhook
endif PYTHON_EXTENSION

if MACINTOSH
SUBDIRS += osx
endif MACINTOSH

if THE_PROGRAMS
if GRAPHICAL_USER_INTERFACE

SUBDIRS += desktop

endif GRAPHICAL_USER_INTERFACE
endif THE_PROGRAMS

SUBDIRS += \
	contrib \
	doc \
	po \
	pycontrib \
	share \
	tests \
	$(NULL)

#--------------------------------------------------------------------------

nodist_pkgconfig_DATA = libfontforge.pc libfontforgeexe.pc

EXTRA_DIST += \
	bootstrap \
	COPYING.gplv3 \
	LICENSE \
	Packaging/FontForge-doc.spec \
	Packaging/FontForge.spec \
	Packaging/FontForge.static.spec \
	README \
	$(NULL)

#--------------------------------------------------------------------------

DISTCHECK_CONFIGURE_FLAGS = --enable-theme-2012 --enable-debug

#	--enable-fontforge-extras				\
#	--disable-native-scripting --disable-python-scripting	\
#	--without-giflib --without-libjpeg --without-libpng	\
#	--without-libtiff --without-libxml --without-libspiro	\
#	--without-libuninameslist --without-libunicodenames	\
#	--without-libreadline


# automake can't parse certain parts of Makefile syntax,
# and there isn't an easy way to make it copy things that it doesn't
# understand without grouching, so we use a sneaky trick, specifically
# a blank macro from configure.ac so as to bypass evaluation.

@BLANK2@-include $(top_srcdir)/pkg.mk

-include $(top_srcdir)/git.mk
