include $(top_srcdir)/Makefile.decl

gvn_lib_LTLIBRARIES = libgvn.la
gvn_include_HEADERS = \
	gvn.h \
	gvn-misc.h \
	gvn-null.h \
	gvn-time.h \
	gvn-param.h \
	gvn-param-spec.h \
	gvn-value.h

AM_CPPFLAGS = $(glib_CFLAGS)
libgvn_la_LIBADD = $(glib_LIBS)
libgvn_la_SOURCES = \
	$(gvn_include_HEADERS) \
	gvn-misc.c \
	gvn-null.c \
	gvn-time.c \
	gvn-param.c \
	gvn-param-spec.c \
	gvn-value.c

pkgconfig_DATA = gvn.pc

EXTRA_DIST = gvn.pc.in

DISTCLEANFILES = gvn.pc

if ENABLE_VALA
if HAVE_INTROSPECTION

-include $(INTROSPECTION_MAKEFILE)

INTROSPECTION_SCANNER_ARGS = $(GIR_SCANNER_ARGS)

introspection_sources = $(libgvn_la_SOURCES)

Gvn-$(VERSION).gir: $(gvn_lib_LTLIBRARIES)
    Gvn_@uVERSION@_gir_INCLUDES = GObject-2.0
    Gvn_@uVERSION@_gir_LIBS = $(gvn_lib_LTLIBRARIES)
    Gvn_@uVERSION@_gir_FILES = $(introspection_sources)
    Gvn_@uVERSION@_gir_EXPORT_PACKAGES = gvn
    INTROSPECTION_GIRS = Gvn-$(VERSION).gir

gir_DATA = $(INTROSPECTION_GIRS)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES = $(gir_DATA) $(typelib_DATA)

$(vapis)/gvn.vapi: $(INTROSPECTION_GIRS) $(vapidata)/Gvn-$(VERSION).metadata
	$(vapigen_v)$(VAPIGEN) -q \
		--directory 	$(vapis) \
		--metadatadir 	$(vapidata) \
		--library 		gvn \
						Gvn-$(VERSION).gir

vapi_DATA = $(vapis)/gvn.vapi

CLEANFILES += $(vapi_DATA)

endif
endif