Merged pidgin/main into default
[pidgin-git.git] / libpurple / plugins / Makefile.am
blobaa9f5f489afc070f0ac9ae856ced621e17800c61
1 DIST_SUBDIRS = keyrings
3 if ENABLE_DBUS
4 DBUS_LTLIB = dbus-example.la
5 endif
7 SUBDIRS = \
8         keyrings
10 plugindir = @PURPLE_PLUGINDIR@
12 autoaccept_la_LDFLAGS         = -module @PLUGIN_LDFLAGS@
13 buddynote_la_LDFLAGS          = -module @PLUGIN_LDFLAGS@
14 codeinline_la_LDFLAGS         = -module @PLUGIN_LDFLAGS@
15 debug_example_la_LDFLAGS      = -module @PLUGIN_LDFLAGS@
16 helloworld_la_LDFLAGS         = -module @PLUGIN_LDFLAGS@
17 idle_la_LDFLAGS               = -module @PLUGIN_LDFLAGS@
18 joinpart_la_LDFLAGS           = -module @PLUGIN_LDFLAGS@
19 log_reader_la_LDFLAGS         = -module @PLUGIN_LDFLAGS@
20 notify_example_la_LDFLAGS     = -module @PLUGIN_LDFLAGS@
21 offlinemsg_la_LDFLAGS         = -module @PLUGIN_LDFLAGS@
22 one_time_password_la_LDFLAGS  = -module @PLUGIN_LDFLAGS@
23 pluginpref_example_la_LDFLAGS = -module @PLUGIN_LDFLAGS@
24 psychic_la_LDFLAGS            = -module @PLUGIN_LDFLAGS@
25 signals_test_la_LDFLAGS       = -module @PLUGIN_LDFLAGS@
26 simple_la_LDFLAGS             = -module @PLUGIN_LDFLAGS@
27 statenotify_la_LDFLAGS        = -module @PLUGIN_LDFLAGS@
29 # this can't be in a conditional otherwise automake 1.4 yells
30 dbus_example_la_LDFLAGS       = -module @PLUGIN_LDFLAGS@
32 if PLUGINS
34 plugin_LTLIBRARIES = \
35         autoaccept.la       \
36         buddynote.la        \
37         idle.la             \
38         joinpart.la         \
39         log_reader.la       \
40         offlinemsg.la       \
41         psychic.la          \
42         statenotify.la
44 noinst_LTLIBRARIES = \
45         codeinline.la \
46         debug_example.la \
47         helloworld.la \
48         notify_example.la \
49         one_time_password.la \
50         pluginpref_example.la \
51         signals_test.la \
52         simple.la \
53         $(DBUS_LTLIB)
55 autoaccept_la_SOURCES       = autoaccept.c
56 buddynote_la_SOURCES        = buddynote.c
57 codeinline_la_SOURCES           = codeinline.c
58 debug_example_la_SOURCES = debug_example.c
59 helloworld_la_SOURCES       = helloworld.c
60 idle_la_SOURCES             = idle.c
61 joinpart_la_SOURCES         = joinpart.c
62 log_reader_la_SOURCES       = log_reader.c
63 notify_example_la_SOURCES   = notify_example.c
64 offlinemsg_la_SOURCES       = offlinemsg.c
65 one_time_password_la_SOURCES    = one_time_password.c
66 pluginpref_example_la_SOURCES = pluginpref_example.c
67 psychic_la_SOURCES          = psychic.c
68 signals_test_la_SOURCES         = signals-test.c
69 simple_la_SOURCES                       = simple.c
70 statenotify_la_SOURCES      = statenotify.c
72 autoaccept_la_LIBADD         = @PURPLE_LIBS@
73 buddynote_la_LIBADD          = @PURPLE_LIBS@
74 codeinline_la_LIBADD         = @PURPLE_LIBS@
75 idle_la_LIBADD               = @PURPLE_LIBS@
76 joinpart_la_LIBADD           = @PURPLE_LIBS@
77 log_reader_la_LIBADD         = @PURPLE_LIBS@
78 notify_example_la_LIBADD     = @PURPLE_LIBS@
79 offlinemsg_la_LIBADD         = @PURPLE_LIBS@
80 one_time_password_la_LIBADD  = @PURPLE_LIBS@
81 pluginpref_example_la_LIBADD = @PURPLE_LIBS@
82 psychic_la_LIBADD            = @PURPLE_LIBS@
83 signals_test_la_LIBADD       = @PURPLE_LIBS@
84 simple_la_LIBADD             = @PURPLE_LIBS@
85 statenotify_la_LIBADD        = @PURPLE_LIBS@
87 if ENABLE_DBUS
89 CLEANFILES              = dbus-example-bindings.c
90 dbus_example_la_SOURCES = dbus-example.c
92 dbus_example_la_LIBADD       = @PURPLE_LIBS@ $(DBUS_LIBS)
94 .PHONY: always
96 $(top_builddir)/libpurple/dbus-types.h: always
97         $(AM_V_GEN)cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
99 dbus-example-bindings.c: $(top_srcdir)/libpurple/dbus-analyze-functions.py $(dbus_example_la_SOURCES)
100         $(AM_V_GEN)cat $(srcdir)/$(dbus_example_la_SOURCES) | \
101         $(PYTHON) $(top_srcdir)/libpurple/dbus-analyze-functions.py --export-only > $@
103 $(dbus_example_la_OBJECTS) dbus-example.so: dbus-example-bindings.c $(top_builddir)/libpurple/dbus-types.h
106 endif # ENABLE_DBUS
108 endif # PLUGINS
110 EXTRA_DIST = \
111         Makefile.mingw \
112         dbus-buddyicons-example.py \
113         filectl.c \
114         startup.py
116 AM_CPPFLAGS = \
117         -I$(top_srcdir)/libpurple \
118         -I$(top_builddir)/libpurple \
119         $(DEBUG_CFLAGS) \
120         $(GLIB_CFLAGS) \
121         $(GPLUGIN_CFLAGS) \
122         $(PLUGIN_CFLAGS) \
123         $(DBUS_CFLAGS)
125 PLUGIN_LIBS =
128 # This part allows people to build their own plugins in here.
129 # Yes, it's a mess.
131 SUFFIXES = .c .so
132 .c.so:
133         $(LIBTOOL) --mode=compile $(CC) -DHAVE_CONFIG_H -I$(top_builddir) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo $(PLUGIN_CFLAGS)
134         $(LIBTOOL) --mode=link    $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) -module @PLUGIN_LDFLAGS@ $(PLUGIN_LIBS)
135         @rm -f tmp$@.lo tmp$@.o libtmp$@.la
136         @cp .libs/libtmp$@*.so $@
137         @rm -rf .libs/libtmp$@.*