diff options
author | Joshua Lock <josh@linux.intel.com> | 2009-11-10 12:10:28 +0000 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2009-11-10 13:38:51 +0000 |
commit | 3e1ec48f6e995413ab89e6bb7e189258cba489d5 (patch) | |
tree | 64cbe2480435c808a1874fa32fe5d367dffa4cf8 /rest-extras | |
parent | 18bce68c8e54032f2d7e78a8484ac892ba3ebd5a (diff) |
Add build machinery for GObject introspection generation
Diffstat (limited to 'rest-extras')
-rw-r--r-- | rest-extras/Makefile.am | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/rest-extras/Makefile.am b/rest-extras/Makefile.am index e59e235..25f1db4 100644 --- a/rest-extras/Makefile.am +++ b/rest-extras/Makefile.am @@ -1,3 +1,5 @@ +CLEANFILES = + lib_sources = \ flickr-proxy.c \ flickr-proxy-call.c \ @@ -34,3 +36,46 @@ test_runner_CFLAGS = -DBUILD_TESTS $(librest_extras_@API_VERSION@_la_CFLAGS) test_runner_LDFLAGS = $(librest_extras_@API_VERSION@_la_LIBADD) # TODO: use gtester + +if HAVE_INTROSPECTION +BUILT_GIRSOURCES = + +RestExtras-@API_VERSION@.gir: $(INTROSPECTION_SCANNER) librest-extras-@API_VERSION@.la + $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \ + --namespace RestExtras --nsversion=@API_VERSION@ \ + --add-include-path=$(top_builddir)/rest \ + --include=GObject-2.0 \ + --include=Soup-2.4 \ + --include=libxml2-2.0 \ + --include=Rest-@API_VERSION@ \ + --library=librest-extras-@API_VERSION@.la \ + --libtool="$(top_builddir)/libtool" \ + --pkg gobject-2.0 \ + --pkg soup-2.0 \ + --pkg libxml-2.0 \ + --output $@ \ + $(lib_headers) \ + $(lib_sources) + +BUILT_GIRSOURCES += RestExtras-@API_VERSION@.gir + +# INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to +# install anything - we need to install inside our prefix. +girdir = $(datadir)/gir-1.0 +gir_DATA = $(BUILT_GIRSOURCES) + +typelibsdir = $(libdir)/girepository-1.0/ +typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) + +%.typelib: %.gir $(INTROSPECTION_COMPILER) + $(QUIET_GEN) \ + LD_LIBRARY_PATH=.libs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} \ + $(INTROSPECTION_COMPILER) \ + --includedir=$(srcdir) \ + --includedir=. \ + --includedir=$(top_builddir)/rest \ + $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) + +CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) + +endif #HAVE_INTROSPECTION |