summaryrefslogtreecommitdiff
path: root/Makefile-gir.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile-gir.am')
-rw-r--r--Makefile-gir.am203
1 files changed, 203 insertions, 0 deletions
diff --git a/Makefile-gir.am b/Makefile-gir.am
new file mode 100644
index 00000000..393abbae
--- /dev/null
+++ b/Makefile-gir.am
@@ -0,0 +1,203 @@
+BUILT_GIRSOURCES =
+
+STATIC_GIRSOURCES = \
+ gir/cairo-1.0.gir \
+ gir/DBus-1.0.gir \
+ gir/DBusGLib-1.0.gir \
+ gir/fontconfig-2.0.gir \
+ gir/freetype2-2.0.gir \
+ gir/GL-1.0.gir \
+ gir/libxml2-2.0.gir \
+ gir/xft-2.0.gir \
+ gir/xlib-2.0.gir \
+ gir/xfixes-4.0.gir \
+ gir/xrandr-1.3.gir
+EXTRA_DIST += $(STATIC_GIRSOURCES)
+
+# glib with source (to enable documentation)
+if WITH_GLIBSRC
+ GLib_2_0_gir_DOCSRC = $(GLIBSRC)/glib/*.c
+ GObject_2_0_gir_DOCSRC = $(GLIBSRC)/gobject/*.c
+ GModule_2_0_gir_DOCSRC = $(GLIBSRC)/gmodule/*.c
+ Gio_2_0_gir_DOCSRC = $(GLIBSRC)/gio/*.c
+else
+ GLib_2_0_gir_DOCSRC =
+ GObject_2_0_gir_DOCSRC =
+ GModule_2_0_gir_DOCSRC =
+ Gio_2_0_gir_DOCSRC =
+
+endif
+
+# glib
+GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
+GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
+
+if OS_WIN32
+GLIB_LIBRARY=libglib-2.0-0
+else
+GLIB_LIBRARY=glib-2.0
+endif
+
+GLib_2_0_gir_LIBS = $(GLIB_LIBRARY)
+GLib_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --identifier-prefix=G \
+ --symbol-prefix=g \
+ --symbol-prefix=glib \
+ --c-include="glib.h" \
+ $(GLib_2_0_gir_DOCSRC)
+GLib_2_0_gir_PACKAGES = glib-2.0
+GLib_2_0_gir_CFLAGS = \
+ -I$(GLIB_INCLUDEDIR) \
+ -I$(GLIB_LIBDIR)/glib-2.0/include \
+ -DGETTEXT_PACKAGE=Dummy \
+ -DGLIB_COMPILATION \
+ -D__G_I18N_LIB_H__
+GLib_2_0_gir_FILES = \
+ $(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h \
+ $(GLIB_INCLUDEDIR)/glib/*.h \
+ gir/glib-2.0.c
+
+BUILT_GIRSOURCES += GLib-2.0.gir
+
+GLib-2.0.gir: g-ir-scanner
+
+DBusGLib-1.0.typelib: GObject-2.0.gir
+
+# gobject
+GOBJECT_INCLUDEDIR=$(shell pkg-config --variable=includedir gobject-2.0)/glib-2.0
+GOBJECT_LIBDIR=$(shell pkg-config --variable=libdir gobject-2.0)
+
+if OS_WIN32
+GOBJECT_LIBRARY=libgobject-2.0-0
+else
+GOBJECT_LIBRARY=gobject-2.0
+endif
+
+GObject-2.0.gir: GLib-2.0.gir
+
+GObject_2_0_gir_LIBS = $(GOBJECT_LIBRARY)
+GObject_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --identifier-prefix=G \
+ --c-include="glib-object.h" \
+ --add-include-path=. \
+ $(GObject_2_0_gir_DOCSRC)
+
+GObject_2_0_gir_PACKAGES = gobject-2.0
+GObject_2_0_gir_INCLUDES = GLib-2.0
+GObject_2_0_gir_CFLAGS = \
+ -DGOBJECT_COMPILATION \
+ -I$(GOBJECT_INCLUDEDIR) \
+ -I$(GOBJECT_LIBDIR)/glib-2.0/include
+GObject_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gobject/*.h gir/gobject-2.0.c
+
+BUILT_GIRSOURCES += GObject-2.0.gir
+
+# gmodule
+GMODULE_INCLUDEDIR=$(shell pkg-config --variable=includedir gmodule-2.0)/glib-2.0
+GMODULE_LIBDIR=$(shell pkg-config --variable=libdir gmodule-2.0)
+
+if OS_WIN32
+GMODULE_LIBRARY=libgmodule-2.0-0
+else
+GMODULE_LIBRARY=gmodule-2.0
+endif
+
+GModule-2.0.gir: GLib-2.0.gir
+
+GModule_2_0_gir_LIBS = $(GMODULE_LIBRARY)
+GModule_2_0_gir_SCANNERFLAGS = \
+ --identifier-prefix=G \
+ --c-include="gmodule.h" \
+ --add-include-path=. \
+ $(GModule_2_0_gir_DOCSRC)
+
+GModule_2_0_gir_PACKAGES = gmodule-2.0
+GModule_2_0_gir_INCLUDES = GLib-2.0
+GModule_2_0_gir_CFLAGS = \
+ -I$(GMODULE_INCLUDEDIR) \
+ -I$(GMODULE_LIBDIR)/glib-2.0/include
+GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h
+
+BUILT_GIRSOURCES += GModule-2.0.gir
+
+# gio
+GIO_INCLUDEDIR=$(shell pkg-config --variable=includedir gio-2.0)/glib-2.0
+GIO_LIBDIR=$(shell pkg-config --variable=libdir gio-2.0)
+
+if OS_WIN32
+GIO_LIBRARY=libgio-2.0-0
+else
+GIO_LIBRARY=gio-2.0
+endif
+
+if HAVE_GIO_UNIX
+GIO_UNIX_HDRS=$(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+GIO_UNIX_PACKAGES = gio-unix-2.0
+else
+GIO_UNIX_HDRS=
+GIO_UNIX_PACKAGES =
+endif
+
+Gio-2.0.gir: GObject-2.0.gir
+
+Gio_2_0_gir_LIBS = $(GIO_LIBRARY)
+Gio_2_0_gir_SCANNERFLAGS = \
+ --reparse-validate \
+ --warn-all \
+ --identifier-prefix=G \
+ --c-include="gio/gio.h" \
+ --add-include-path=. \
+ $(Gio_2_0_gir_DOCSRC)
+
+Gio_2_0_gir_PACKAGES = gio-2.0 $(GIO_UNIX_PACKAGES)
+Gio_2_0_gir_INCLUDES = GObject-2.0
+Gio_2_0_gir_CFLAGS = \
+ -DGIO_COMPILATION \
+ -I$(GIO_LIBDIR)/glib-2.0/include
+Gio_2_0_gir_FILES = \
+ $(GIO_UNIX_HDRS) \
+ $(GIO_INCLUDEDIR)/gio/*.h \
+ gir/gio-2.0.c
+
+BUILT_GIRSOURCES += Gio-2.0.gir
+EXTRA_DIST += gir/glib-2.0.c gir/gobject-2.0.c gir/gio-2.0.c
+
+# girepository
+GIRepository-2.0.gir: GObject-2.0.gir libgirepository-1.0.la
+
+GIRepository_2_0_gir_LIBS = libgirepository-1.0.la
+GIRepository_2_0_gir_SCANNERFLAGS = \
+ --warn-all \
+ --identifier-prefix=GI \
+ --symbol-prefix=g \
+ --c-include="girepository.h" \
+ --add-include-path=.
+GIRepository_2_0_gir_PACKAGES = gobject-2.0
+GIRepository_2_0_gir_INCLUDES = GObject-2.0
+GIRepository_2_0_gir_EXPORT_PACKAGES = gobject-introspection-1.0
+GIRepository_2_0_gir_CFLAGS = \
+ -I$(top_srcdir)/girepository -I$(top_srcdir) \
+ -DGI_COMPILATION
+GIRepository_2_0_gir_FILES = \
+ $(top_srcdir)/girepository/girepository.h \
+ $(top_srcdir)/girepository/girepository.c \
+ $(top_srcdir)/girepository/gi*info.c \
+ $(top_srcdir)/girepository/gi*info.h \
+ $(top_srcdir)/girepository/gitypelib.h \
+ $(top_srcdir)/girepository/gitypes.h
+
+BUILT_GIRSOURCES += GIRepository-2.0.gir
+
+CLEANFILES += $(BUILT_GIRSOURCES)
+
+INTROSPECTION_GIRS += $(BUILT_GIRSOURCES)
+
+girdir = $(GIR_DIR)
+gir_DATA = $(STATIC_GIRSOURCES) $(BUILT_GIRSOURCES)
+
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(GIRSOURCES:.gir=.typelib)
+
+CLEANFILES += $(typelibs_DATA)