diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 44 | ||||
-rw-r--r-- | src/main.c | 6 |
2 files changed, 42 insertions, 8 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 9f17e3d..8480ef5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -70,7 +70,7 @@ INST_H_FILES = \ eom-jobs.h \ eom-plugin.h -libeom_la_SOURCES = \ +libeom_c_files = \ eom-application.c \ eom-session.c \ eom-debug.c \ @@ -110,7 +110,10 @@ libeom_la_SOURCES = \ eom-plugin-engine.c \ eom-clipboard-handler.c \ uta.c \ - zoom.c \ + zoom.c + +libeom_la_SOURCES = \ + $(libeom_c_files) \ $(BUILT_SOURCES) \ $(NOINST_H_FILES) \ $(INST_H_FILES) @@ -119,7 +122,7 @@ if HAVE_EXIF INST_H_FILES += \ eom-exif-util.h \ eom-exif-details.h -libeom_la_SOURCES += \ +libeom_c_files += \ eom-exif-util.c \ eom-exif-details.c endif @@ -144,12 +147,10 @@ libeom_la_SOURCES += \ eom-exif-details.c endif HAVE_EXEMPI -libeom_la_CFLAGS = \ +libeom_la_CPPFLAGS = \ -I$(top_srcdir)/jpegutils \ -I$(top_srcdir)/cut-n-paste/toolbar-editor \ -I$(top_srcdir)/cut-n-paste/totem-screensaver \ - $(EOM_CFLAGS) \ - $(WARN_CFLAGS) \ -DG_LOG_DOMAIN=\"EOM\" \ -DEOM_PREFIX=\""${prefix}"\" \ -DEOM_DATA_DIR=\""$(pkgdatadir)"\" \ @@ -157,6 +158,10 @@ libeom_la_CFLAGS = \ -DEOM_PIXMAPS_DIR=\""$(datadir)/pixmaps/eom"\" \ -DEOM_PLUGIN_DIR=\""$(libdir)/eom/plugins"\" +libeom_la_CFLAGS = \ + $(EOM_CFLAGS) \ + $(WARN_CFLAGS) + libeom_la_LIBADD = \ $(EOM_LIBS) @@ -186,7 +191,8 @@ eom_CFLAGS = \ -I$(top_srcdir)/cut-n-paste/totem-screensaver \ $(EOM_CFLAGS) \ -DEOM_DATA_DIR=\""$(pkgdatadir)"\" \ - -DEOM_LOCALE_DIR=\""$(datadir)/locale"\" + -DEOM_LOCALE_DIR=\""$(datadir)/locale"\" \ + $(INTROSPECTION_CFLAGS) eom_LDADD = \ libeom.la \ @@ -194,7 +200,8 @@ eom_LDADD = \ $(LIBJPEG) \ $(toolbar_LIB) \ $(screensaver_LIB) \ - $(jpeg_LIB) + $(jpeg_LIB) \ + $(INTROSPECTION_LIBS) BUILT_SOURCES = \ eom-enum-types.c \ @@ -231,6 +238,27 @@ endif CLEANFILES = $(BUILT_SOURCES) +if HAVE_INTROSPECTION +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = Eom-1.0.gir +INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all $(libeom_la_CPPFLAGS) + +Eom-1.0.gir: eom +Eom_1_0_gir_INCLUDES = Gtk-${GTK_API_VERSION} +Eom_1_0_gir_FILES = $(INST_H_FILES) $(libeom_c_files) $(BUILT_SOURCES) +Eom_1_0_gir_VERSION = 1.0 +Eom_1_0_gir_PROGRAM = $(builddir)/eom +Eom_1_0_gir_NAMESPACE = Eom +Eom_1_0_gir_CFLAGS = $(EOM_CFLAGS) +girdir = $(datadir)/eom/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS) + +typelibdir = $(libdir)/eom/girepository-1.0 +typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA) $(typelib_DATA) +endif + dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) @@ -30,6 +30,9 @@ #include <dbus/dbus-glib-bindings.h> #include <gdk/gdkx.h> #endif +#ifdef HAVE_INSTROSPECTION +#include <girepository.h> +#endif #include "eom-session.h" #include "eom-debug.h" @@ -196,6 +199,9 @@ main (int argc, char **argv) /* Option groups are free'd together with the context * Using gtk_get_option_group here initializes gtk during parsing */ g_option_context_add_group (ctx, gtk_get_option_group (TRUE)); +#ifdef HAVE_INTROSPECTION + g_option_context_add_group (ctx, g_irepository_get_option_group ()); +#endif if (!g_option_context_parse (ctx, &argc, &argv, &error)) { gchar *help_msg; |