From 5fee3b69a6d39788dbc0ffde0668e3a7fc39c70b Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 2 Nov 2018 13:21:48 +0100 Subject: automake: Add GObject Introspection support. --- src/Makefile.am | 25 +++++++++++++++++++++++++ src/rda.h | 2 ++ 2 files changed, 27 insertions(+) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 4cae77f..028a51b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,3 +30,28 @@ librda_la_LIBADD = \ pkgconfig_DATA = rda.pc pkgconfigdir = $(libdir)/pkgconfig + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = rda-1.0.gir +INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + +if HAVE_INTROSPECTION +introspection_sources = $(librdainclude_HEADERS) \ + $(librda_la_SOURCES) \ + $(NULL) + +rda-1.0.gir: librda.la +rda_1_0_gir_INCLUDES = GObject-2.0 GLib-2.0 +rda_1_0_gir_CFLAGS = $(librda_la_CFLAGS) +rda_1_0_gir_LIBS = librda.la +rda_1_0_gir_FILES = $(introspection_sources) + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif diff --git a/src/rda.h b/src/rda.h index 366e0ce..563bd7a 100644 --- a/src/rda.h +++ b/src/rda.h @@ -24,6 +24,8 @@ #ifndef RDA_H #define RDA_H +#include + G_BEGIN_DECLS enum { -- cgit v1.2.3