summaryrefslogtreecommitdiff
path: root/src/plugins/mk/interfaces.mk
blob: 34be1eb3ab8928b5127f389acbe40dfcfef9a144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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`)