Allow compilation from outside source directory
[claws.git] / src / plugins / vcalendar / Makefile.am
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
6 EXTRA_DIST = claws.def plugin.def version.rc
7
8 IFLAGS = \
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
15 if OS_WIN32
16
17 LTRCCOMPILE = $(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
24 plugin_res = version.lo
25 plugin_res_ldflag = -Wl,.libs/version.o
26
27 export_symbols = -export-symbols $(srcdir)/plugin.def
28
29 plugin_deps = libclaws.a $(plugin_res) plugin.def
30
31 libclaws.a: claws.def
32         $(DLLTOOL) --output-lib $@ --def $<
33
34 plugin_ldadd = -L. -lclaws
35
36 else
37 plugin_res =
38 plugin_res_ldflag =
39 export_symbols =
40 plugin_deps =
41 plugin_ldadd =
42 endif
43
44 if PLATFORM_WIN32
45 no_undefined = -no-undefined
46 else
47 no_undefined =
48 endif
49
50 if CYGWIN
51 cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
52 else
53 cygwin_export_lib = 
54 endif
55
56 plugindir = $(pkglibdir)/plugins
57
58 if BUILD_VCALENDAR_PLUGIN
59 plugin_LTLIBRARIES = vcalendar.la
60 endif
61
62 vcalendar_la_SOURCES = \
63         plugin.c \
64         vcal_interface.h \
65         vcalendar.c vcalendar.h \
66         vcal_manager.c vcal_manager.h \
67         vcal_folder.c vcal_folder.h \
68         vcal_meeting_gtk.c vcal_meeting_gtk.h \
69         vcal_prefs.c vcal_prefs.h \
70         vcal_dbus.c vcal_dbus.h \
71         common-views.c common-views.h \
72         day-view.c month-view.c
73
74 vcalendar_la_LDFLAGS = \
75         $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
76         -avoid-version -module \
77         $(GTK_LIBS) $(LIBICAL_LIBS)
78
79 vcalendar_la_DEPENDENCIES = $(plugin_deps)
80
81 vcalendar_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
82         $(GTK_LIBS) \
83         $(CURL_LIBS) \
84   $(LIBICAL_LIBS)
85
86 vcalendar_la_CPPFLAGS = \
87         $(IFLAGS) \
88         $(GLIB_CFLAGS) \
89         $(GTK_CFLAGS) \
90         $(ENCHANT_CFLAGS) \
91         $(CURL_CFLAGS) \
92   $(LIBICAL_CFLAGS)
93
94 clean-local:
95         rm -f libclaws.a
96
97 .PHONY: test