metainfo: add pgpmime plugin
[claws.git] / src / plugins / pgpmime / Makefile.am
index 858fade98ee7c9cafdc6218d4ee0f5559a4fa04c..124c682a92bbcdf723243c8961937c498e7368a4 100644 (file)
@@ -1,9 +1,23 @@
-EXTRA_DIST = version.rc plugin.def sylpheed.def mypgpcore.def pgpmime.deps
+# Makefile.am for "src/plugins/pgpmime" directory
+# This file is part of Claws Mail package.
+# See COPYING file for license details.
 
-if PLATFORM_WIN32
+appdata_files = claws-mail-pgpmime.metainfo.xml
+appdatadir = $(datadir)/appdata
+appdata_DATA = $(appdata_files)
+EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpmime.deps \
+                                                $(appdata_files)
+
+IFLAGS = \
+       -I$(top_srcdir)/src \
+       -I$(top_srcdir)/src/common \
+       -I$(top_builddir)/src/common \
+       -I$(top_srcdir)/src/gtk
+
+if OS_WIN32
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
-     `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
+     `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
 
 %.lo : %.rc
@@ -12,34 +26,45 @@ LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
 plugin_res = version.lo
 plugin_res_ldflag = -Wl,.libs/version.o
 
-no_undefined = -no-undefined
 export_symbols = -export-symbols $(srcdir)/plugin.def
 
-plugin_deps = libsylpheed.a libmypgpcore.a $(plugin_res) plugin.def
+plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
 
-libsylpheed.a: sylpheed.def
+libclaws.a: claws.def
        $(DLLTOOL) --output-lib $@ --def $<
 
 libmypgpcore.a: mypgpcore.def
        $(DLLTOOL) --output-lib $@ --def $<
 
-plugin_ldadd = -L . -lsylpheed -lmypgpcore
+plugin_ldadd = -L. -lclaws -lmypgpcore
 
 else
 plugin_res =
 plugin_res_ldflag =
-no_undefined =
 export_symbols =
 plugin_deps =
 plugin_ldadd =
 endif
 
+if PLATFORM_WIN32
+no_undefined = -no-undefined
+else
+no_undefined =
+endif
+
+if CYGWIN
+cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
+pgpcore_lib = ../pgpcore/pgpcore.la
+else
+pgpcore_lib = 
+endif
 
 plugindir = $(pkglibdir)/plugins
 plugin_DATA=pgpmime.deps
 
+if BUILD_PGPMIME_PLUGIN
 plugin_LTLIBRARIES = pgpmime.la
-
+endif
 
 pgpmime_la_SOURCES = \
        plugin.c \
@@ -51,22 +76,20 @@ plugininclude_HEADERS = \
 
 pgpmime_la_LDFLAGS = \
        $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
-       -avoid-version -module \
-        $(GTK_LIBS) \
-       $(GPGME_LIBS)
+       -avoid-version -module 
 pgpmime_la_DEPENDENCIES = $(plugin_deps)
-pgpmime_la_LIBADD = $(plugin_ldadd)
-
-INCLUDES = \
-       -I$(top_srcdir)/src \
-       -I$(top_srcdir)/src/common \
-       -I$(top_srcdir)/src/gtk
+pgpmime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
+        $(GTK_LIBS) \
+       $(GPGME_LIBS) \
+       $(ENCHANT_LIBS)
 
-AM_CPPFLAGS = \
+pgpmime_la_CPPFLAGS = \
+       $(IFLAGS) \
        $(GLIB_CFLAGS) \
        $(GTK_CFLAGS) \
        $(GPGME_CFLAGS) \
+       $(ENCHANT_CFLAGS) \
        -Wno-deprecated-declarations
 
 clean-local:
-       rm -f libsylpheed.a
+       rm -f libclaws.a