Improve tag-goto popup
[geany-mirror.git] / plugins / Makefile.am
blob5460ca5a28de0f5a65f50e83f6cd444aea0c073f
1 # Adapted from Pidgin's plugins/Makefile.am, thanks
3 EXTRA_DIST = \
4         demoproxytest.px
6 plugindir = $(libdir)/geany
8 plugins_includedir = $(includedir)/geany
9 plugins_include_HEADERS = \
10         geanyfunctions.h \
11         geanyplugin.h
13 demoplugin_la_LDFLAGS    = -module -avoid-version -no-undefined
14 demoproxy_la_LDFLAGS     = -module -avoid-version -no-undefined
15 classbuilder_la_LDFLAGS  = -module -avoid-version -no-undefined
16 htmlchars_la_LDFLAGS     = -module -avoid-version -no-undefined
17 export_la_LDFLAGS        = -module -avoid-version -no-undefined
18 saveactions_la_LDFLAGS   = -module -avoid-version -no-undefined
19 filebrowser_la_LDFLAGS   = -module -avoid-version -no-undefined
20 splitwindow_la_LDFLAGS   = -module -avoid-version -no-undefined
22 if PLUGINS
23 # Plugins to be installed
24 plugin_LTLIBRARIES = \
25         classbuilder.la \
26         htmlchars.la \
27         export.la \
28         saveactions.la \
29         filebrowser.la \
30         splitwindow.la
32 # Plugins not to be installed
33 noinst_LTLIBRARIES = \
34         demoplugin.la  \
35         demoproxy.la
37 demoplugin_la_SOURCES    = demoplugin.c
38 demoproxy_la_SOURCES     = demoproxy.c
39 classbuilder_la_SOURCES  = classbuilder.c
40 htmlchars_la_SOURCES     = htmlchars.c
41 export_la_SOURCES        = export.c
42 saveactions_la_SOURCES   = saveactions.c
43 filebrowser_la_SOURCES   = filebrowser.c
44 splitwindow_la_SOURCES   = splitwindow.c
46 demoplugin_la_CFLAGS    = -DG_LOG_DOMAIN=\""Demoplugin"\"
47 demoproxy_la_CFLAGS     = -DG_LOG_DOMAIN=\""Demoproxy"\"
48 classbuilder_la_CFLAGS  = -DG_LOG_DOMAIN=\""Classbuilder"\"
49 htmlchars_la_CFLAGS     = -DG_LOG_DOMAIN=\""HTMLChars"\"
50 export_la_CFLAGS        = -DG_LOG_DOMAIN=\""Export"\"
51 saveactions_la_CFLAGS   = -DG_LOG_DOMAIN=\""SaveActions"\"
52 filebrowser_la_CFLAGS   = -DG_LOG_DOMAIN=\""FileBrowser"\"
53 splitwindow_la_CFLAGS   = -DG_LOG_DOMAIN=\""SplitWindow"\"
55 demoplugin_la_LIBADD    = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
56 demoproxy_la_LIBADD     = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
57 classbuilder_la_LIBADD  = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
58 htmlchars_la_LIBADD     = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
59 export_la_LIBADD        = $(top_builddir)/src/libgeany.la $(GTK_LIBS) -lm
60 saveactions_la_LIBADD   = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
61 filebrowser_la_LIBADD   = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
62 splitwindow_la_LIBADD   = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
64 endif # PLUGINS
66 if MINGW
67 AM_CPPFLAGS = -DGEANY_DATADIR=\"data\" -DGEANY_LOCALEDIR=\"\"
68 else
69 AM_CPPFLAGS = -DGEANY_DATADIR=\"$(datadir)\" -DGEANY_LOCALEDIR=\""$(localedir)"\"
70 endif
72 AM_CPPFLAGS += \
73         -DGTK \
74         -I$(top_srcdir)/src \
75         -I$(top_srcdir)/src/tagmanager \
76         -I$(top_srcdir)/scintilla/lexilla/include \
77         -I$(top_srcdir)/scintilla/include \
78         $(GTK_CFLAGS) \
79         $(PLUGIN_CFLAGS)
82 # This part allows people to build their own plugins in here.
83 # Yes, it's a mess.
85 custom_plugins_cppflags = -DHAVE_CONFIG_H -I$(top_srcdir)
86 custom_plugins_ldflags = -module -avoid-version
87 if MINGW
88 SUFFIXES = .c .dll
89 .c.dll:
90         $(CC) $(AM_CPPFLAGS) $(custom_plugins_cppflags) $(CPPFLAGS) $(CFLAGS) -o $@.o -c $<
91         $(CC) -shared $@.o $(GTK_LIBS) $(custom_plugins_ldflags) $(LIBS) $(PLUGIN_LIBS) $(LDFLAGS) -o $@
92 else
93 SUFFIXES = .c .so
94 .c.so:
95         $(LIBTOOL) --mode=compile $(CC) $(AM_CPPFLAGS) $(custom_plugins_cppflags) $(CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo
96         $(LIBTOOL) --mode=link    $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) $(custom_plugins_ldflags) $(PLUGIN_LIBS)
97         @rm -f tmp$@.lo tmp$@.o libtmp$@.la
98         @cp .libs/libtmp$@.so* $@
99         @rm -f .libs/libtmp$@.*
100 endif