metainfo: add pgpmime plugin
[claws.git] / src / plugins / pgpmime / Makefile.am
1 # Makefile.am for "src/plugins/pgpmime" directory
2 # This file is part of Claws Mail package.
3 # See COPYING file for license details.
4
5 appdata_files = claws-mail-pgpmime.metainfo.xml
6 appdatadir = $(datadir)/appdata
7 appdata_DATA = $(appdata_files)
8 EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpmime.deps \
9                                                  $(appdata_files)
10
11 IFLAGS = \
12         -I$(top_srcdir)/src \
13         -I$(top_srcdir)/src/common \
14         -I$(top_builddir)/src/common \
15         -I$(top_srcdir)/src/gtk
16
17 if OS_WIN32
18
19 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
20      `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \
21      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
22
23 %.lo : %.rc
24         $(LTRCCOMPILE) -i $< -o $@
25
26 plugin_res = version.lo
27 plugin_res_ldflag = -Wl,.libs/version.o
28
29 export_symbols = -export-symbols $(srcdir)/plugin.def
30
31 plugin_deps = libclaws.a libmypgpcore.a $(plugin_res) plugin.def
32
33 libclaws.a: claws.def
34         $(DLLTOOL) --output-lib $@ --def $<
35
36 libmypgpcore.a: mypgpcore.def
37         $(DLLTOOL) --output-lib $@ --def $<
38
39 plugin_ldadd = -L. -lclaws -lmypgpcore
40
41 else
42 plugin_res =
43 plugin_res_ldflag =
44 export_symbols =
45 plugin_deps =
46 plugin_ldadd =
47 endif
48
49 if PLATFORM_WIN32
50 no_undefined = -no-undefined
51 else
52 no_undefined =
53 endif
54
55 if CYGWIN
56 cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
57 pgpcore_lib = ../pgpcore/pgpcore.la
58 else
59 pgpcore_lib = 
60 endif
61
62 plugindir = $(pkglibdir)/plugins
63 plugin_DATA=pgpmime.deps
64
65 if BUILD_PGPMIME_PLUGIN
66 plugin_LTLIBRARIES = pgpmime.la
67 endif
68
69 pgpmime_la_SOURCES = \
70         plugin.c \
71         pgpmime.c
72
73 pluginincludedir = $(pkgincludedir)/plugins/pgpmime
74 plugininclude_HEADERS = \
75         pgpmime.h 
76
77 pgpmime_la_LDFLAGS = \
78         $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
79         -avoid-version -module 
80 pgpmime_la_DEPENDENCIES = $(plugin_deps)
81 pgpmime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \
82         $(GTK_LIBS) \
83         $(GPGME_LIBS) \
84         $(ENCHANT_LIBS)
85
86 pgpmime_la_CPPFLAGS = \
87         $(IFLAGS) \
88         $(GLIB_CFLAGS) \
89         $(GTK_CFLAGS) \
90         $(GPGME_CFLAGS) \
91         $(ENCHANT_CFLAGS) \
92         -Wno-deprecated-declarations
93
94 clean-local:
95         rm -f libclaws.a