fix bug 4483, 'cannot open certain links anymore'
[claws.git] / src / plugins / pgpcore / Makefile.am
1 # Copyright 1999-2014 the Claws Mail team.
2 # This file is part of Claws Mail package, and distributed under the
3 # terms of the General Public License version 3 (or later).
4 # See COPYING file for license details.
5
6 if BUILD_TESTS
7 include $(top_srcdir)/tests.mk
8 SUBDIRS = . tests
9 endif
10
11 EXTRA_DIST = version.rc plugin.def claws.def
12
13 IFLAGS = \
14         -I$(top_builddir)/src \
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 $(plugin_res) plugin.def
35
36 libclaws.a: claws.def
37         $(DLLTOOL) --output-lib $@ --def $<
38
39 plugin_ldadd = -L. -lclaws
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 else
58 cygwin_export_lib =
59 endif
60
61 plugindir = $(pkglibdir)/plugins
62
63 if BUILD_PGPCORE_PLUGIN
64 plugin_LTLIBRARIES = pgpcore.la
65 endif
66
67 pgpcore_la_SOURCES = \
68         autocompletion.c autocompletion.h \
69         passphrase.c passphrase.h \
70         plugin.c \
71         prefs_gpg.c prefs_gpg.h \
72         select-keys.c select-keys.h \
73         sgpgme.c sgpgme.h \
74         pgp_utils.c pgp_utils.h \
75         pgp_viewer.c pgp_viewer.h
76
77 pluginincludedir = $(pkgincludedir)/plugins/pgpcore
78 plugininclude_HEADERS = \
79         passphrase.h \
80         prefs_gpg.h \
81         sgpgme.h \
82         pgp_utils.h
83
84 pgpcore_la_LDFLAGS = \
85         $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
86         -avoid-version -module 
87 pgpcore_la_DEPENDENCIES = $(plugin_deps)
88 pgpcore_la_LIBADD = $(cygwin_export_lib) $(plugin_ldadd) \
89         $(GTK_LIBS) \
90         $(GPGME_LIBS) \
91         $(ENCHANT_LIBS)
92
93 pgpcore_la_CPPFLAGS = \
94         $(IFLAGS) \
95         $(GLIB_CFLAGS) \
96         $(GTK_CFLAGS) \
97         $(GPGME_CFLAGS) \
98         $(ENCHANT_CFLAGS) \
99         -Wno-deprecated-declarations
100
101 clean-local:
102         rm -f libclaws.a