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