summaryrefslogtreecommitdiff
path: root/plugins/Makefile.plugin.mk
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
commit29a7aef998e975b42401cfa96d1b750d91eadf06 (patch)
treeeda2bdff398789ea2358cc39986dd1f7ee9d027a /plugins/Makefile.plugin.mk
parent4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff)
Imported Upstream version 0.23.2upstream/0.23.2
Diffstat (limited to 'plugins/Makefile.plugin.mk')
-rw-r--r--plugins/Makefile.plugin.mk17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Makefile.plugin.mk b/plugins/Makefile.plugin.mk
index 03df7b0..c26c672 100644
--- a/plugins/Makefile.plugin.mk
+++ b/plugins/Makefile.plugin.mk
@@ -28,9 +28,6 @@ PKGS := $(shell sed ':a;N;$$!ba;s/\n/ /g' ../shotwell-plugin-dev-1.0.deps) $(PKG
EXT_PKGS := $(PKGS)
PKGS := shotwell-plugin-dev-1.0 $(PKGS) $(PLUGIN_PKGS)
-# automatically include the Resources.vala common file
-SRC_FILES := ../common/Resources.vala $(SRC_FILES)
-
CFILES := $(notdir $(SRC_FILES:.vala=.c))
OFILES := $(notdir $(SRC_FILES:.vala=.o))
@@ -41,10 +38,14 @@ DEFINES := -D_VERSION='"$(PLUGINS_VERSION)"' -DGETTEXT_PACKAGE='"shotwell"'
all: $(PLUGIN).so
+PLUGIN_EXTRAFLAGS ?= --vapidir=../common --pkg shotwell-plugin-common
+PLUGIN_EXTRALINKFLAGS ?= -L../common/ -lshotwell-plugin-common
+
.stamp: $(SRC_FILES) $(MAKE_FILES) $(HEADER_FILES)
$(VALAC) --target-glib=$(MIN_GLIB_VERSION) -g --enable-checking --fatal-warnings --ccode --enable-deprecated \
--vapidir=../ $(foreach pkg,$(PKGS),--pkg=$(pkg)) $(foreach pkg,$(CUSTOM_VAPI_PKGS),--pkg=$(pkg)) \
$(USER_VALAFLAGS) \
+ $(PLUGIN_EXTRAFLAGS) \
--vapidir=../../vapi \
$(SRC_FILES)
@touch .stamp
@@ -53,10 +54,10 @@ $(CFILES): .stamp
@
.c.o:
- $(CC) -c $(CFLAGS) $(DEFINES) -I../.. $<
+ $(CC) -c $(CFLAGS) $(DEFINES) -I../.. -I ../common $<
$(PLUGIN).so: $(OFILES)
- $(CC) $(LDFLAGS) -shared $(OFILES) $(LIBS) -o $@
+ $(CC) $(LDFLAGS) -shared $(OFILES) $(LIBS) $(PLUGIN_EXTRALINKFLAGS) -o $@
.PHONY: cleantemps
cleantemps:
@@ -70,8 +71,10 @@ clean: cleantemps
.PHONY: distclean
distclean: clean
+PLUGIN_DIR ?= $(PLUGIN)
+
.PHONY: listfiles
listfiles:
- @printf "plugins/$(PLUGIN)/Makefile $(foreach file,$(SRC_FILES),plugins/$(PLUGIN)/$(file)) "
- @printf "$(foreach rc,$(RC_FILES),plugins/$(PLUGIN)/$(rc)) "
+ @printf "plugins/$(PLUGIN_DIR)/Makefile $(foreach file,$(SRC_FILES),plugins/$(PLUGIN_DIR)/$(file)) "
+ @printf "$(foreach rc,$(RC_FILES),plugins/$(PLUGIN_DIR)/$(rc)) "