[shotwell/wip/autotools: 10/27] build: Create plugin vapi



commit 76164eb4e5cbfe955d1d75e22d1fd3d19e651bce
Author: Jens Georg <mail jensge org>
Date:   Wed Jun 29 00:19:50 2016 +0200

    build: Create plugin vapi
    
    Signed-off-by: Jens Georg <mail jensge org>

 Makefile.am |   20 ++++++++++++++++++++
 common.am   |   14 ++++++++++++++
 shotwell.am |   29 ++++++++---------------------
 3 files changed, 42 insertions(+), 21 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index faae55b..52b9bc0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,6 +32,26 @@ GITIGNOREFILES = \
        INSTALL \
        $(NULL)
 
+noinst_LTLIBRARIES = \
+       src/plugins/libplugin.la
+
+src_plugins_libplugin_la_SOURCES = \
+       src/plugins/SpitInterfaces.vala \
+       src/plugins/TransitionsInterfaces.vala \
+       src/plugins/PublishingInterfaces.vala \
+       src/plugins/DataImportsInterfaces.vala
+
+src_plugins_libplugin_la_VALAFLAGS = \
+       --pkg gio-2.0 \
+       --pkg gtk+-3.0 \
+       --pkg gmodule-2.0 \
+       --pkg gee-0.8 \
+       --library plugins \
+       --vapi=plugins/shotwell-plugin-dev-1.0.vapi \
+       --header=plugins/shotwell-plugin-dev-1.0.h
+
+src_plugins_libplugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+
 -include $(top_srcdir)/git.mk
 
 include $(top_srcdir)/common.am
diff --git a/common.am b/common.am
index d97b014..339934a 100644
--- a/common.am
+++ b/common.am
@@ -3,3 +3,17 @@
 COMMON_VALAFLAGS = \
        --enable-checking -g --target-glib=2.32 --thread --fatal-warnings \
        --enable-experimental --enable-deprecated
+
+COMMON_CFLAGS = \
+       -I$(top_srcdir)/vapi \
+       -D_PREFIX='"$(prefix)"' \
+       -D_VERSION='"$(VERSION)"' \
+       -DGETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
+       -D_LANG_SUPPORT_DIR='"$(prefix)/share/locale"' \
+       -D_LIBEXECDIR='"$(libexecdir)"' \
+       -D_LIB='"$(libdir)"'
+
+if IS_GITVERSION
+COMMON_CFLAGS += -D_GIT_VERSION='"@GITVER@"'
+COMMON_VALAFLAGS += --define=_GITVERSION
+endif
diff --git a/shotwell.am b/shotwell.am
index cb51ec0..7c5b5bf 100644
--- a/shotwell.am
+++ b/shotwell.am
@@ -2,15 +2,10 @@ bin_PROGRAMS = shotwell
 shotwell_CFLAGS = \
        $(SHOTWELL_CFLAGS) \
        $(UNITY_CFLAGS) \
-       -I$(top_srcdir)/vapi \
-       -D_PREFIX='"$(prefix)"' \
-       -D_VERSION='"$(VERSION)"' \
-       -DGETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
-       -D_LANG_SUPPORT_DIR='"$(prefix)/share/locale"' \
-       -D_LIBEXECDIR='"$(libexecdir)"' \
-       -D_LIB='"$(libdir)"'
+       $(COMMON_CFLAGS) \
+       -Iplugins
 
-shotwell_LDADD = $(SHOTWELL_LIBS) $(UNITY_LIBS)
+shotwell_LDADD = src/plugins/libplugin.la $(SHOTWELL_LIBS) $(UNITY_LIBS)
 shotwell_VALAFLAGS = $(COMMON_VALAFLAGS) \
        --pkg gio-2.0 --pkg gtk+-3.0 --pkg gee-0.8 \
        --pkg gio-unix-2.0 --pkg sqlite3 --pkg gmodule-2.0 \
@@ -21,11 +16,6 @@ shotwell_VALAFLAGS = $(COMMON_VALAFLAGS) \
        $(UNITY_VALAFLAGS) \
        $(COMMON_VALAFLAGS_POST)
 
-if IS_GITVERSION
-shotwell_CFLAGS += -D_GIT_VERSION='"@GITVER@"'
-shotwell_VALAFLAGS += --define=_GITVERSION
-endif
-
 shotwell_SOURCES = \
        src/unit/Unit.vala \
        src/util/Util.vala \
@@ -51,13 +41,6 @@ shotwell_SOURCES = \
        src/db/SavedSearchDBTable.vala \
        src/editing_tools/EditingTools.vala \
        src/editing_tools/StraightenTool.vala \
-       src/plugins/Plugins.vala \
-       src/plugins/PublishingInterfaces.vala \
-       src/plugins/SpitInterfaces.vala \
-       src/plugins/TransitionsInterfaces.vala \
-       src/plugins/StandardHostInterface.vala \
-       src/plugins/ManifestWidget.vala \
-       src/plugins/DataImportsInterfaces.vala \
        src/slideshow/Slideshow.vala \
        src/slideshow/TransitionEffects.vala \
        src/photos/Photos.vala \
@@ -72,6 +55,9 @@ shotwell_SOURCES = \
        src/photos/RawSupport.vala \
        src/photos/PngSupport.vala \
        src/photos/TiffSupport.vala \
+       src/plugins/Plugins.vala \
+       src/plugins/StandardHostInterface.vala \
+       src/plugins/ManifestWidget.vala \
        src/publishing/Publishing.vala \
        src/publishing/PublishingUI.vala \
        src/publishing/PublishingPluginHost.vala \
@@ -221,4 +207,5 @@ shotwell_SOURCES = \
        src/.unitize/_DataImportsInternals.vala \
        src/.unitize/_FoldersInternals.vala \
        src/.unitize/_Library_unitize_entry.vala \
-       src/.unitize/_Direct_unitize_entry.vala
+       src/.unitize/_Direct_unitize_entry.vala \
+       plugins/shotwell-plugin-dev-1.0.vapi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]