summaryrefslogtreecommitdiff
path: root/src/plugins/mk/interfaces.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mk/interfaces.mk')
-rw-r--r--src/plugins/mk/interfaces.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/plugins/mk/interfaces.mk b/src/plugins/mk/interfaces.mk
new file mode 100644
index 0000000..34be1eb
--- /dev/null
+++ b/src/plugins/mk/interfaces.mk
@@ -0,0 +1,29 @@
+
+PLUGIN_INTERFACES := \
+ src/plugins/SpitInterfaces.vala \
+ src/plugins/TransitionsInterfaces.vala \
+ src/plugins/PublishingInterfaces.vala \
+ src/plugins/DataImportsInterfaces.vala
+
+PLUGIN_PKG_REQS := \
+ gobject-2.0 \
+ glib-2.0 \
+ gdk-3.0 \
+ gtk+-3.0 \
+ gee-0.8
+
+PLUGIN_VAPI := plugins/shotwell-plugin-dev-1.0.vapi
+PLUGIN_HEADER := $(PLUGIN_VAPI:.vapi=.h)
+PLUGIN_DEPS := $(PLUGIN_VAPI:.vapi=.deps)
+
+$(PLUGIN_DEPS): src/plugins/mk/interfaces.mk
+ rm -f $@
+ $(foreach pkg,$(PLUGIN_PKG_REQS),`echo $(pkg) >> $@`)
+
+$(PLUGIN_HEADER): $(PLUGIN_VAPI)
+
+$(PLUGIN_VAPI): $(PLUGIN_INTERFACES) src/plugins/mk/interfaces.mk
+ $(call check_valac_version)
+ $(VALAC) -c $(VALAFLAGS) -X -DGETTEXT_PACKAGE='"shotwell"' -X -I. $(foreach pkg,$(PLUGIN_PKG_REQS),--pkg=$(pkg)) --includedir=plugins --vapi=$@ --header=$(basename $@).h $(PLUGIN_INTERFACES)
+ $(foreach src,$(PLUGIN_INTERFACES),`rm $(notdir $(src)).o`)
+