summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-08-08 17:07:48 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-08-08 17:07:48 -0700
commit2c5daf59dd359f684736811b95c70d523b06b06b (patch)
treeaa8f6c5a09ebd9320e7493f0e1bb90e13c157dfc /src
parenta6d62fdebecbbe4495a3ed43b5ca0253cb14888f (diff)
Allow building both gtk2 and gtk3 versions of plugin
To make things more useful for GNOME/epiphany, which is squarely in gtk3 land, allow building both the gtk2 and gtk3 versions of the plugin. I'm not sure what will happen when both plugin's are in the browser's path. A subsequent patch will allow finer grained control of the installation directory.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2fd2fd7..d6b2266 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,15 +1,31 @@
-AM_CFLAGS = $(MOZILLA_CFLAGS) $(EVINCE_CFLAGS) $(E_CFLAGS)
-
-noinst_LTLIBRARIES = libevbp-viewer.la
-libevbp_viewer_la_LIBADD = $(EVINCE_LIBS)
-libevbp_viewer_la_SOURCES = \
+libevbp2_viewer_la_CFLAGS = $(E_CFLAGS) $(MOZILLA_CFLAGS) $(EVINCE2_CFLAGS)
+libevbp2_viewer_la_LIBADD = $(EVINCE2_LIBS)
+libevbp2_viewer_la_SOURCES = \
evbp-viewer.h evbp-viewer.c \
evbp-mime.h evbp-mime.c \
ev-page-action.h ev-page-action.c \
ev-page-action-widget.h ev-page-action-widget.c
+libevbp3_viewer_la_CFLAGS = $(E_CFLAGS) $(MOZILLA_CFLAGS) $(EVINCE3_CFLAGS)
+libevbp3_viewer_la_LIBADD = $(EVINCE3_LIBS)
+libevbp3_viewer_la_SOURCES = $(libevbp2_viewer_la_SOURCES)
+
+libevince2_plugin_la_CFLAGS = $(E_CFLAGS) $(MOZILLA_CFLAGS) $(EVINCE2_CFLAGS)
+libevince2_plugin_la_LDFLAGS = -avoid-version -module
+libevince2_plugin_la_LIBADD = libevbp2-viewer.la
+libevince2_plugin_la_SOURCES = evbp.c
+libevince3_plugin_la_CFLAGS = $(E_CFLAGS) $(MOZILLA_CFLAGS) $(EVINCE3_CFLAGS)
+libevince3_plugin_la_LDFLAGS = $(libevince2_plugin_la_LDFLAGS)
+libevince3_plugin_la_LIBADD = libevbp3-viewer.la
+libevince3_plugin_la_SOURCES = $(libevince2_plugin_la_SOURCES)
+noinst_LTLIBRARIES =
plugindir = $(libdir)/mozilla/plugins
-plugin_LTLIBRARIES = libevince-plugin.la
-libevince_plugin_la_LDFLAGS = -avoid-version -module
-libevince_plugin_la_LIBADD = libevbp-viewer.la
-libevince_plugin_la_SOURCES = evbp.c
+plugin_LTLIBRARIES =
+if ENABLE_GTK2
+noinst_LTLIBRARIES += libevbp2-viewer.la
+plugin_LTLIBRARIES += libevince2-plugin.la
+endif
+if ENABLE_GTK3
+noinst_LTLIBRARIES += libevbp3-viewer.la
+plugin_LTLIBRARIES += libevince3-plugin.la
+endif