## Process this file with automake to produce Makefile.in

BUILT_SOURCES += 		\
	scannerparser.c		\
	scannerparser.h 	\
	scannerlexer.c 		\
	scannerlexer.h

AM_YFLAGS = -d -t

# Why do I have to do this automake?
scannerlexer.h: scannerlexer.c

noinst_LTLIBRARIES += libgiscanner.la

libgiscanner_la_SOURCES = \
	giscanner/sourcescanner.c				\
	giscanner/sourcescanner.h				\
	giscanner/scannerlexer.l				\
	giscanner/scannerparser.y				\
	giscanner/grealpath.h
libgiscanner_la_CPPFLAGS = -I$(top_srcdir)/girepository -I$(top_srcdir)/giscanner
libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)

# Python module
pkgpyexecdir = $(pkglibdir)/giscanner
pkgpyexec_LTLIBRARIES = _giscanner.la
pkgpyexec_PYTHON =			\
	giscanner/__init__.py		\
	giscanner/annotationmain.py	\
	giscanner/annotationparser.py	\
	giscanner/ast.py		\
	giscanner/cachestore.py		\
	giscanner/codegen.py		\
	giscanner/docbookdescription.py	\
	giscanner/docbookwriter.py	\
	giscanner/docmain.py	\
	giscanner/dumper.py		\
	giscanner/introspectablepass.py	\
	giscanner/girparser.py		\
	giscanner/girwriter.py		\
	giscanner/gdumpparser.py 	\
	giscanner/libtoolimporter.py	\
	giscanner/odict.py		\
	giscanner/mallardwriter.py	\
	giscanner/maintransformer.py	\
	giscanner/message.py		\
	giscanner/shlibs.py		\
	giscanner/scannermain.py	\
	giscanner/sourcescanner.py	\
	giscanner/testcodegen.py	\
	giscanner/transformer.py	\
	giscanner/utils.py		\
	giscanner/xmlwriter.py

_giscanner_la_CFLAGS = \
	$(PYTHON_INCLUDES) \
	$(GOBJECT_CFLAGS) \
	-I$(top_srcdir)/giscanner
_giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS)

_giscanner_la_LDFLAGS = \
	-module -avoid-version -export-symbols-regex init_giscanner

if OS_WIN32
# Windows requires Python extension modules to be explicitly
# linked to libpython. Extension modules are shared libaries
# (.dll files), but need to be called .pyd for Python to load
# them as extension modules.
_giscanner_la_LIBADD += \
	$(PYTHON_LIBS)

_giscanner_la_LDFLAGS += \
	-no-undefined \
	-shrext ".pyd"
endif

_giscanner_la_SOURCES = giscanner/giscannermodule.c
