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