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