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