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