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