Use consistent shadows across Geany
[geany-mirror.git] / plugins / Makefile.am
blobde37f1da1ad320062b0a4e1dbcf1067559e2f6c0
1 # Adapted from Pidgin's plugins/Makefile.am, thanks
3 EXTRA_DIST = \
4         makefile.win32 \
5         genapi.py
7 plugindir = $(libdir)/geany
9 plugins_includedir = $(includedir)/geany
10 plugins_include_HEADERS = \
11         geanyplugin.h \
12         geanyfunctions.h
14 # systems without python should continue to build OK
15 geanyfunctions.h: genapi.py ../src/plugins.c
16         python genapi.py || true
18 all: geanyfunctions.h
21 demoplugin_la_LDFLAGS    = -module -avoid-version -no-undefined
22 classbuilder_la_LDFLAGS  = -module -avoid-version -no-undefined
23 htmlchars_la_LDFLAGS     = -module -avoid-version -no-undefined
24 export_la_LDFLAGS        = -module -avoid-version -no-undefined
25 saveactions_la_LDFLAGS   = -module -avoid-version -no-undefined
26 filebrowser_la_LDFLAGS   = -module -avoid-version -no-undefined
27 splitwindow_la_LDFLAGS   = -module -avoid-version -no-undefined
29 if PLUGINS
31 # Plugins to be installed
32 plugin_LTLIBRARIES = \
33         classbuilder.la \
34         htmlchars.la \
35         export.la \
36         saveactions.la \
37         filebrowser.la \
38         splitwindow.la
40 # Plugins not to be installed
41 noinst_LTLIBRARIES = \
42         demoplugin.la
44 demoplugin_la_SOURCES    = demoplugin.c
45 classbuilder_la_SOURCES  = classbuilder.c
46 htmlchars_la_SOURCES     = htmlchars.c
47 export_la_SOURCES        = export.c
48 saveactions_la_SOURCES   = saveactions.c
49 filebrowser_la_SOURCES   = filebrowser.c
50 splitwindow_la_SOURCES   = splitwindow.c
52 demoplugin_la_CFLAGS    = -DG_LOG_DOMAIN=\""Demoplugin"\"
53 classbuilder_la_CFLAGS  = -DG_LOG_DOMAIN=\""Classbuilder"\"
54 htmlchars_la_CFLAGS     = -DG_LOG_DOMAIN=\""HTMLChars"\"
55 export_la_CFLAGS        = -DG_LOG_DOMAIN=\""Export"\"
56 saveactions_la_CFLAGS   = -DG_LOG_DOMAIN=\""SaveActions"\"
57 filebrowser_la_CFLAGS   = -DG_LOG_DOMAIN=\""FileBrowser"\"
58 splitwindow_la_CFLAGS   = -DG_LOG_DOMAIN=\""SplitWindow"\"
60 demoplugin_la_LIBADD    = $(GTK_LIBS)
61 classbuilder_la_LIBADD  = $(GTK_LIBS)
62 htmlchars_la_LIBADD     = $(GTK_LIBS)
63 export_la_LIBADD        = $(GTK_LIBS) -lm
64 saveactions_la_LIBADD   = $(GTK_LIBS)
65 filebrowser_la_LIBADD   = $(GTK_LIBS)
66 splitwindow_la_LIBADD   = $(GTK_LIBS)
68 endif # PLUGINS
70 if MINGW
71 # FIXME: why is this define different than the non-MINGW one?
72 AM_CPPFLAGS = -DGEANY_DATADIR=\"data\"
73 else
74 AM_CPPFLAGS = -DDATADIR=\"$(datadir)\"
75 endif
77 AM_CPPFLAGS += \
78         -DGTK \
79         -I$(top_srcdir)/src \
80         -I$(top_srcdir)/tagmanager/src \
81         -I$(top_srcdir)/scintilla/include \
82         $(GTK_CFLAGS) \
83         $(PLUGIN_CFLAGS)
86 # This part allows people to build their own plugins in here.
87 # Yes, it's a mess.
89 custom_plugins_cppflags = -DHAVE_CONFIG_H -I$(top_srcdir)
90 custom_plugins_ldflags = -module -avoid-version
91 if MINGW
92 SUFFIXES = .c .dll
93 .c.dll:
94         $(CC) $(AM_CPPFLAGS) $(custom_plugins_cppflags) $(CPPFLAGS) $(CFLAGS) -o $@.o -c $<
95         $(CC) -shared $@.o $(GTK_LIBS) $(custom_plugins_ldflags) $(LIBS) $(PLUGIN_LIBS) $(LDFLAGS) -o $@
96 else
97 SUFFIXES = .c .so
98 .c.so:
99         $(LIBTOOL) --mode=compile $(CC) $(AM_CPPFLAGS) $(custom_plugins_cppflags) $(CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo
100         $(LIBTOOL) --mode=link    $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) $(custom_plugins_ldflags) $(PLUGIN_LIBS)
101         @rm -f tmp$@.lo tmp$@.o libtmp$@.la
102         @cp .libs/libtmp$@.so* $@
103         @rm -f .libs/libtmp$@.*
104 endif