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