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