b987616a75845f2b95d8daf877da3b63c3b46a26
[claws.git] / src / plugins / notification / Makefile.am
1 if BUILD_HOTKEYS
2 hotkey_lib = libcmnpgtkhotkey.la
3 hotkey_lib_path = $(top_builddir)/src/plugins/notification/gtkhotkey/libcmnpgtkhotkey.la
4 else
5 hotkey_lib =
6 hotkey_lib_path =
7 endif
8
9 SUBDIRS=gtkhotkey
10 EXTRA_DIST = claws.def plugin.def version.rc
11 CFLAGS += "-Wall"
12
13 if OS_WIN32
14
15 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
16      `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
17      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
18
19 %.lo : %.rc
20         $(LTRCCOMPILE) -i $< -o $@
21
22 plugin_res = version.lo
23 plugin_res_ldflag = -Wl,.libs/version.o
24
25 export_symbols = -export-symbols $(srcdir)/plugin.def
26
27 plugin_deps = libclaws.a $(plugin_res) plugin.def $(hotkey_lib) 
28
29 libclaws.a: claws.def
30         $(DLLTOOL) --output-lib $@ --def $<
31
32 plugin_ldadd = -L. -lclaws
33
34 else
35 plugin_res =
36 plugin_res_ldflag =
37 export_symbols =
38 plugin_deps =
39 plugin_ldadd =
40 endif
41
42 if PLATFORM_WIN32
43 no_undefined = -no-undefined
44 else
45 no_undefined =
46 endif
47
48 if CYGWIN
49 cygwin_export_lib = -L$(top_builddir)/src -lclaws-mail
50 else
51 cygwin_export_lib = 
52 endif
53
54 plugindir = $(pkglibdir)/plugins
55
56 if BUILD_NOTIFICATION_PLUGIN
57 plugin_LTLIBRARIES = notification.la
58 endif
59
60 notification_la_SOURCES = \
61         notification_plugin.c notification_plugin.h \
62         notification_core.c notification_core.h \
63         notification_popup.c notification_popup.h \
64         notification_banner.c notification_banner.h \
65         notification_command.c notification_command.h \
66         notification_lcdproc.c notification_lcdproc.h \
67         notification_trayicon.c notification_trayicon.h \
68         notification_indicator.c notification_indicator.h \
69         notification_hotkeys.c notification_hotkeys.h \
70         notification_prefs.c notification_prefs.h \
71         notification_foldercheck.c notification_foldercheck.h \
72         notification_pixbuf.c notification_pixbuf.h \
73         raw_claws_mail_logo_64x64.h
74
75 notification_la_LDFLAGS = \
76         $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \
77         -avoid-version -module
78
79 notification_la_DEPENDENCIES = $(plugin_deps) \
80         $(hotkey_lib_path)
81
82 INCLUDES = \
83         -I$(top_srcdir)/src/plugins/notification/gtkhotkey \
84         -I$(top_srcdir)/src \
85         -I$(top_srcdir)/src/common \
86         -I$(top_builddir)/src/common \
87         -I$(top_srcdir)/src/gtk
88
89
90 notification_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \
91         $(GTK_LIBS)  \
92         $(libnotify_LIBS) \
93         $(libindicate_LIBS) \
94         $(libcanberra_gtk_LIBS) \
95         $(hotkey_lib_path)
96
97 notification_la_CPPFLAGS = \
98         $(NOTIFY_CFLAGS) \
99         $(CLAWS_MAIL_CFLAGS) \
100         $(GLIB_CFLAGS) \
101         $(GTK_CFLAGS) \
102         -DLOCALEDIR=\""$(localedir)"\" \
103         $(libnotify_CFLAGS) \
104         $(libindicate_CFLAGS) \
105         $(libcanberra_gtk_CFLAGS)
106
107 clean-local:
108         rm -f libclaws.a