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

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

EXTRA_DIST += \
	giscanner/meson.build

AM_YFLAGS = -d -t

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

noinst_LTLIBRARIES += libgiscanner.la

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

# Python module
pkgpyexecdir = $(pkglibdir)/giscanner
pkgpyexec_LTLIBRARIES = _giscanner.la
pkgpyexec_PYTHON = 			\
	giscanner/__init__.py		\
	giscanner/_version.py		\
	giscanner/annotationmain.py	\
	giscanner/annotationparser.py	\
	giscanner/ast.py		\
	giscanner/cachestore.py		\
	giscanner/ccompiler.py		\
	giscanner/codegen.py		\
	giscanner/docmain.py		\
	giscanner/docwriter.py		\
	giscanner/dumper.py		\
	giscanner/gdumpparser.py 	\
	giscanner/girparser.py		\
	giscanner/girwriter.py		\
	giscanner/introspectablepass.py	\
	giscanner/libtoolimporter.py	\
	giscanner/maintransformer.py	\
	giscanner/mdextensions.py	\
	giscanner/message.py		\
	giscanner/msvccompiler.py	\
	giscanner/pkgconfig.py		\
	giscanner/scannermain.py	\
	giscanner/sectionparser.py	\
	giscanner/shlibs.py		\
	giscanner/sourcescanner.py	\
	giscanner/testcodegen.py	\
	giscanner/transformer.py	\
	giscanner/utils.py		\
	giscanner/xmlwriter.py

templatedir = $(pkglibdir)
nobase_dist_template_DATA =		\
	giscanner/doctemplates/mallard/base.tmpl		\
	giscanner/doctemplates/mallard/class.tmpl		\
	giscanner/doctemplates/mallard/namespace.tmpl		\
	giscanner/doctemplates/mallard/C/callback.tmpl 		\
	giscanner/doctemplates/mallard/C/class.tmpl		\
	giscanner/doctemplates/mallard/C/constructor.tmpl	\
	giscanner/doctemplates/mallard/C/default.tmpl		\
	giscanner/doctemplates/mallard/C/enum.tmpl		\
	giscanner/doctemplates/mallard/C/function.tmpl		\
	giscanner/doctemplates/mallard/C/field.tmpl 		\
	giscanner/doctemplates/mallard/C/interface.tmpl		\
	giscanner/doctemplates/mallard/C/method.tmpl		\
	giscanner/doctemplates/mallard/C/namespace.tmpl		\
	giscanner/doctemplates/mallard/C/property.tmpl		\
	giscanner/doctemplates/mallard/C/record.tmpl		\
	giscanner/doctemplates/mallard/C/signal.tmpl		\
	giscanner/doctemplates/mallard/C/vfunc.tmpl		\
	giscanner/doctemplates/mallard/Python/callback.tmpl 	\
	giscanner/doctemplates/mallard/Python/class.tmpl	\
	giscanner/doctemplates/mallard/Python/constructor.tmpl	\
	giscanner/doctemplates/mallard/Python/default.tmpl	\
	giscanner/doctemplates/mallard/Python/enum.tmpl		\
	giscanner/doctemplates/mallard/Python/function.tmpl	\
	giscanner/doctemplates/mallard/Python/field.tmpl 	\
	giscanner/doctemplates/mallard/Python/interface.tmpl	\
	giscanner/doctemplates/mallard/Python/method.tmpl	\
	giscanner/doctemplates/mallard/Python/namespace.tmpl	\
	giscanner/doctemplates/mallard/Python/property.tmpl	\
	giscanner/doctemplates/mallard/Python/record.tmpl	\
	giscanner/doctemplates/mallard/Python/signal.tmpl	\
	giscanner/doctemplates/mallard/Python/vfunc.tmpl	\
	giscanner/doctemplates/mallard/Gjs/callback.tmpl 	\
	giscanner/doctemplates/mallard/Gjs/class.tmpl		\
	giscanner/doctemplates/mallard/Gjs/constructor.tmpl	\
	giscanner/doctemplates/mallard/Gjs/default.tmpl		\
	giscanner/doctemplates/mallard/Gjs/enum.tmpl		\
	giscanner/doctemplates/mallard/Gjs/function.tmpl	\
	giscanner/doctemplates/mallard/Gjs/field.tmpl 		\
	giscanner/doctemplates/mallard/Gjs/interface.tmpl	\
	giscanner/doctemplates/mallard/Gjs/method.tmpl		\
	giscanner/doctemplates/mallard/Gjs/namespace.tmpl	\
	giscanner/doctemplates/mallard/Gjs/property.tmpl	\
	giscanner/doctemplates/mallard/Gjs/record.tmpl		\
	giscanner/doctemplates/mallard/Gjs/signal.tmpl		\
	giscanner/doctemplates/mallard/Gjs/vfunc.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/_doc.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/_index.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/_method.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/_methods.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/_properties.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/_signals.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/_staticmethods.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/_vfuncs.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/base.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/callback.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/class.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/default.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/enum.tmpl		\
	giscanner/doctemplates/devdocs/Gjs/function.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/interface.tmpl	\
	giscanner/doctemplates/devdocs/Gjs/namespace.tmpl

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

_giscanner_la_LDFLAGS = \
	$(WARN_LDFLAGS) \
	-module -avoid-version \
	-export-symbols-regex "init_giscanner|PyInit__giscanner"

if OS_WIN32
# Windows requires Python extension modules to be explicitly
# linked to libpython.
_giscanner_la_LIBADD += \
	$(PYTHON_LIBS)

_giscanner_la_LDFLAGS += \
	-no-undefined \
	-shrext $(PYTHON_SO)
endif

_giscanner_la_SOURCES = giscanner/giscannermodule.c
