2007-06-26 16:17:16 +00:00
|
|
|
# Adapted from Pidgin's plugins/Makefile.am, thanks
|
|
|
|
|
2007-09-10 18:25:03 +00:00
|
|
|
EXTRA_DIST = \
|
2007-10-24 12:04:15 +00:00
|
|
|
makefile.win32 \
|
2008-12-02 16:34:32 +00:00
|
|
|
genapi.py
|
2007-06-26 16:17:16 +00:00
|
|
|
|
|
|
|
plugindir = $(libdir)/geany
|
|
|
|
|
2009-01-12 00:33:29 +00:00
|
|
|
plugins_includedir = $(includedir)/geany
|
2008-12-02 16:34:32 +00:00
|
|
|
plugins_include_HEADERS = \
|
2009-07-14 15:06:20 +00:00
|
|
|
geanyplugin.h \
|
2008-12-02 16:34:32 +00:00
|
|
|
geanyfunctions.h
|
2008-03-13 12:15:26 +00:00
|
|
|
|
2008-12-03 12:41:05 +00:00
|
|
|
# systems without python should continue to build OK
|
|
|
|
geanyfunctions.h: genapi.py ../src/plugins.c
|
|
|
|
python genapi.py || true
|
|
|
|
|
|
|
|
all: geanyfunctions.h
|
|
|
|
|
|
|
|
|
2007-06-26 16:17:16 +00:00
|
|
|
demoplugin_la_LDFLAGS = -module -avoid-version
|
2007-07-04 11:32:33 +00:00
|
|
|
classbuilder_la_LDFLAGS = -module -avoid-version
|
2007-07-23 15:41:08 +00:00
|
|
|
htmlchars_la_LDFLAGS = -module -avoid-version
|
2007-08-19 17:40:19 +00:00
|
|
|
export_la_LDFLAGS = -module -avoid-version
|
2008-10-02 13:37:35 +00:00
|
|
|
saveactions_la_LDFLAGS = -module -avoid-version
|
2007-10-22 12:42:19 +00:00
|
|
|
filebrowser_la_LDFLAGS = -module -avoid-version
|
2008-08-26 15:58:07 +00:00
|
|
|
splitwindow_la_LDFLAGS = -module -avoid-version
|
2007-06-26 16:17:16 +00:00
|
|
|
|
|
|
|
if PLUGINS
|
|
|
|
|
2009-02-24 18:25:41 +00:00
|
|
|
if MINGW
|
|
|
|
# build Geany for Windows on non-Windows systems (cross-compile)
|
|
|
|
# (this is a little hack'ish and surely can be improved)
|
|
|
|
DLL_LD_FLAGS = -module -avoid-version
|
|
|
|
MINGW_CFLAGS = \
|
|
|
|
-DGEANY_DATADIR=\"data\" \
|
|
|
|
-DHAVE_CONFIG_H \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-I$(top_srcdir)/src \
|
|
|
|
-I$(top_srcdir)/tagmanager/include \
|
|
|
|
-I$(top_srcdir)/scintilla/include \
|
|
|
|
$(GTK_CFLAGS) \
|
|
|
|
$(PLUGIN_CFLAGS)
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all-local: \
|
|
|
|
classbuilder.dll \
|
|
|
|
htmlchars.dll \
|
|
|
|
export.dll \
|
|
|
|
saveactions.dll \
|
|
|
|
filebrowser.dll
|
|
|
|
# Split Window is broken on Windows
|
|
|
|
# splitwindow.dll
|
|
|
|
|
|
|
|
.c.dll:
|
|
|
|
$(CC) $(MINGW_CFLAGS) -o $@.o -c $<
|
|
|
|
$(CC) -shared $@.o $(GTK_LIBS) $(DLL_LD_FLAGS) -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o *.dll
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2007-06-26 16:17:16 +00:00
|
|
|
# Plugins to be installed
|
|
|
|
plugin_LTLIBRARIES = \
|
2007-07-23 15:41:08 +00:00
|
|
|
classbuilder.la \
|
2007-08-19 17:40:19 +00:00
|
|
|
htmlchars.la \
|
2007-10-15 08:52:20 +00:00
|
|
|
export.la \
|
2008-10-02 13:37:35 +00:00
|
|
|
saveactions.la \
|
2008-08-26 15:58:07 +00:00
|
|
|
filebrowser.la \
|
|
|
|
splitwindow.la
|
2007-06-26 16:17:16 +00:00
|
|
|
|
|
|
|
# Plugins not to be installed
|
2007-08-29 16:11:42 +00:00
|
|
|
noinst_LTLIBRARIES = \
|
|
|
|
demoplugin.la
|
2007-06-26 16:17:16 +00:00
|
|
|
|
|
|
|
demoplugin_la_SOURCES = demoplugin.c
|
2007-07-04 11:32:33 +00:00
|
|
|
classbuilder_la_SOURCES = classbuilder.c
|
2007-07-23 15:41:08 +00:00
|
|
|
htmlchars_la_SOURCES = htmlchars.c
|
2007-08-19 17:40:19 +00:00
|
|
|
export_la_SOURCES = export.c
|
2008-10-02 13:37:35 +00:00
|
|
|
saveactions_la_SOURCES = saveactions.c
|
2007-10-22 12:42:19 +00:00
|
|
|
filebrowser_la_SOURCES = filebrowser.c
|
2008-08-26 15:58:07 +00:00
|
|
|
splitwindow_la_SOURCES = splitwindow.c
|
2007-06-26 16:17:16 +00:00
|
|
|
|
2008-05-21 16:53:40 +00:00
|
|
|
# instead of linking against all in $(GTK_LIBS), we link only against needed libs
|
2008-05-28 16:09:16 +00:00
|
|
|
demoplugin_la_LIBADD = $(GTK_LIBS)
|
|
|
|
classbuilder_la_LIBADD = $(GTK_LIBS)
|
|
|
|
htmlchars_la_LIBADD = $(GTK_LIBS)
|
|
|
|
export_la_LIBADD = $(GTK_LIBS)
|
2008-10-02 13:37:35 +00:00
|
|
|
saveactions_la_LIBADD = $(GTK_LIBS)
|
2008-05-28 16:09:16 +00:00
|
|
|
filebrowser_la_LIBADD = $(GTK_LIBS)
|
2008-08-26 15:58:07 +00:00
|
|
|
splitwindow_la_LIBADD = $(GTK_LIBS)
|
2008-05-28 16:09:16 +00:00
|
|
|
|
2009-02-24 18:25:41 +00:00
|
|
|
endif # MINGW
|
2007-06-26 16:17:16 +00:00
|
|
|
endif # PLUGINS
|
|
|
|
|
|
|
|
AM_CPPFLAGS = \
|
|
|
|
-DDATADIR=\"$(datadir)\" \
|
2007-07-24 09:24:14 +00:00
|
|
|
-I$(top_srcdir)/src \
|
2007-06-26 16:17:16 +00:00
|
|
|
-I$(top_srcdir)/tagmanager/include \
|
|
|
|
-I$(top_srcdir)/scintilla/include \
|
2007-06-26 18:08:00 +00:00
|
|
|
$(GTK_CFLAGS) \
|
2007-06-26 16:17:16 +00:00
|
|
|
$(PLUGIN_CFLAGS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# This part allows people to build their own plugins in here.
|
|
|
|
# Yes, it's a mess.
|
|
|
|
#
|
|
|
|
SUFFIXES = .c .so
|
|
|
|
.c.so:
|
|
|
|
$(LIBTOOL) --mode=compile $(CC) -DHAVE_CONFIG_H -I$(top_srcdir) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo $(PLUGIN_CFLAGS)
|
|
|
|
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) -module -avoid-version $(PLUGIN_LIBS)
|
|
|
|
@rm -f tmp$@.lo tmp$@.o libtmp$@.la
|
|
|
|
@cp .libs/libtmp$@.so* $@
|
|
|
|
@rm -f .libs/libtmp$@.*
|