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