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