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