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