Kaydet (Commit) d33758da authored tarafından Matthew Brush's avatar Matthew Brush Kaydeden (comit) Thomas Martitz

Move Geany's core into a library (libgeany)

This will allow plugins to link against the core when accessing API
functions, now that the macro/struct/funcptr stuff is gone.

Also convert the helper libraries into Libtool helper libraries as
linking a shared library against static libraries is (apparently) not
portable.
üst 860df276
......@@ -122,9 +122,6 @@ AC_SUBST([pkgdatadir])
GEANY_CHECK_DOCUTILS
GEANY_CHECK_DOXYGEN
#FIXME: replace this with a real check that the compiler supports the argument
CFLAGS="${CFLAGS} -fvisibility=hidden"
# Output
AC_CONFIG_FILES([
Makefile
......
......@@ -10,5 +10,5 @@ Name: Geany
Description: A fast and lightweight IDE using GTK2
Requires: @DEPENDENCIES@
Version: @VERSION@
Libs: -L${libdir}
Libs: -L${libdir} -lgeany
Cflags: -DGTK -I${includedir}/geany -I${includedir}/geany/tagmanager -I${includedir}/geany/scintilla
......@@ -19,7 +19,6 @@ filebrowser_la_LDFLAGS = -module -avoid-version -no-undefined
splitwindow_la_LDFLAGS = -module -avoid-version -no-undefined
if PLUGINS
# Plugins to be installed
plugin_LTLIBRARIES = \
classbuilder.la \
......@@ -49,13 +48,13 @@ saveactions_la_CFLAGS = -DG_LOG_DOMAIN=\""SaveActions"\"
filebrowser_la_CFLAGS = -DG_LOG_DOMAIN=\""FileBrowser"\"
splitwindow_la_CFLAGS = -DG_LOG_DOMAIN=\""SplitWindow"\"
demoplugin_la_LIBADD = $(GTK_LIBS)
classbuilder_la_LIBADD = $(GTK_LIBS)
htmlchars_la_LIBADD = $(GTK_LIBS)
export_la_LIBADD = $(GTK_LIBS) -lm
saveactions_la_LIBADD = $(GTK_LIBS)
filebrowser_la_LIBADD = $(GTK_LIBS)
splitwindow_la_LIBADD = $(GTK_LIBS)
demoplugin_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
classbuilder_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
htmlchars_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
export_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS) -lm
saveactions_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
filebrowser_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
splitwindow_la_LIBADD = $(top_builddir)/src/libgeany.la $(GTK_LIBS)
endif # PLUGINS
......
......@@ -16,8 +16,8 @@ src/geanyentryaction.c
src/highlighting.c
src/keybindings.c
src/keyfile.c
src/libmain.c
src/log.c
src/main.c
src/msgwindow.c
src/navqueue.c
src/notebook.c
......
SUBDIRS = include
noinst_LIBRARIES=libscintilla.a
noinst_LTLIBRARIES=libscintilla.la
AM_CXXFLAGS = -DNDEBUG -DGTK -DSCI_LEXER -DG_THREADS_IMPL_NONE
......@@ -139,9 +139,10 @@ src/XPM.cxx \
src/XPM.h \
$(LEXER_SRCS)
libscintilla_a_SOURCES = $(SRCS)
libscintilla_la_SOURCES = $(SRCS)
AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/include -I$(srcdir)/src -I$(srcdir)/lexlib @GTK_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)/include -I$(srcdir)/src -I$(srcdir)/lexlib @GTK_CFLAGS@ \
-fvisibility=hidden
marshallers: gtk/scintilla-marshal.list
glib-genmarshal --prefix scintilla_marshal gtk/scintilla-marshal.list --header > gtk/scintilla-marshal.h
......
......@@ -14,6 +14,10 @@ EXTRA_DIST = \
$(top_srcdir)/src/dynamicsymbols.list
bin_PROGRAMS = geany
lib_LTLIBRARIES = libgeany.la
geany_SOURCES = main.c
geany_LDADD = libgeany.la $(GTK_LIBS) $(GTHREAD_LIBS) $(INTLLIBS)
SRCS = \
about.c about.h \
......@@ -35,7 +39,7 @@ SRCS = \
keybindings.c keybindings.h \
keyfile.c keyfile.h \
log.c log.h \
main.c main.h geany.h \
libmain.c main.h geany.h \
msgwindow.c msgwindow.h \
navqueue.c navqueue.h \
notebook.c notebook.h \
......@@ -107,18 +111,19 @@ nodist_EXTRA_geany_SOURCES = dummy.cxx
if MINGW
# build Geany for Windows on non-Windows systems (cross-compile)
geany_SOURCES = $(SRCS) win32.c win32.h
libgeany_la_SOURCES = $(SRCS) win32.c win32.h
geany_LDADD = \
$(top_builddir)/scintilla/libscintilla.a \
$(top_builddir)/tagmanager/ctags/libctags.a \
$(top_builddir)/tagmanager/mio/libmio.a \
$(top_builddir)/tagmanager/src/libtagmanager.a \
libgeany_la_LIBADD = \
$(top_builddir)/scintilla/libscintilla.la \
$(top_builddir)/tagmanager/ctags/libctags.la \
$(top_builddir)/tagmanager/mio/libmio.la \
$(top_builddir)/tagmanager/src/libtagmanager.la \
@GTK_LIBS@ \
@GTHREAD_LIBS@ \
$(INTLLIBS) \
-lole32 -luuid -lwsock32 \
geany_private.res
-lole32 -luuid -lwsock32 -lcomdlg32
geany_LDADD += geany_private.res -lcomdlg32
AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
-DGEANY_DOCDIR=\"\" \
......@@ -127,9 +132,10 @@ AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
-DGEANY_PREFIX=\"\" \
-DGEANY_PRIVATE \
-DGTK \
-DG_LOG_DOMAIN=\""Geany"\"
-DG_LOG_DOMAIN=\""Geany"\" \
-fvisibility=hidden
geany_LDFLAGS = -mwindows -mms-bitfields
libgeany_la_LDFLAGS = -mwindows -mms-bitfields -no-undefined
WINDRES = $(host_alias)-windres
......@@ -142,19 +148,19 @@ clean-local:
else
# build Geany for all other platforms
geany_SOURCES = $(SRCS) vte.c vte.h
libgeany_la_SOURCES = $(SRCS) vte.c vte.h
geany_LDADD = \
$(top_builddir)/scintilla/libscintilla.a \
$(top_builddir)/tagmanager/ctags/libctags.a \
$(top_builddir)/tagmanager/mio/libmio.a \
$(top_builddir)/tagmanager/src/libtagmanager.a \
libgeany_la_LIBADD = \
$(top_builddir)/scintilla/libscintilla.la \
$(top_builddir)/tagmanager/ctags/libctags.la \
$(top_builddir)/tagmanager/mio/libmio.la \
$(top_builddir)/tagmanager/src/libtagmanager.la \
@GTK_LIBS@ \
@GTHREAD_LIBS@ \
$(MAC_INTEGRATION_LIBS) \
$(INTLLIBS)
geany_LDFLAGS = -Wl,--dynamic-list="$(srcdir)/dynamicsymbols.list"
libgeany_la_LDFLAGS = -Wl,--dynamic-list="$(srcdir)/dynamicsymbols.list"
AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
-DGEANY_DOCDIR=\""$(docdir)"\" \
......@@ -163,7 +169,8 @@ AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
-DGEANY_PREFIX=\""$(prefix)"\" \
-DGEANY_PRIVATE \
-DGTK \
-DG_LOG_DOMAIN=\""Geany"\"
-DG_LOG_DOMAIN=\""Geany"\" \
-fvisibility=hidden
clean-local:
......
This diff is collapsed.
This diff is collapsed.
......@@ -75,6 +75,8 @@ gboolean main_handle_filename(const gchar *locale_filename);
void main_load_project_from_command_line(const gchar *locale_filename, gboolean use_session);
gint main_lib(gint argc, gchar **argv);
#endif /* GEANY_PRIVATE */
G_END_DECLS
......
......@@ -3,12 +3,13 @@ AM_CPPFLAGS = \
-I$(srcdir)/.. \
-DG_LOG_DOMAIN=\"CTags\"
AM_CFLAGS = \
$(GTK_CFLAGS)
$(GTK_CFLAGS) \
-fvisibility=hidden
EXTRA_DIST = \
makefile.win32
noinst_LIBRARIES = libctags.a
noinst_LTLIBRARIES = libctags.la
parsers = \
abaqus.c \
......@@ -53,7 +54,7 @@ parsers = \
verilog.c \
vhdl.c
libctags_a_SOURCES = \
libctags_la_SOURCES = \
args.c \
args.h \
ctags.c \
......
noinst_LIBRARIES = libmio.a
noinst_LTLIBRARIES = libmio.la
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"MIO\" #-DMIO_DEBUG
AM_CFLAGS = $(GTK_CFLAGS)
AM_CFLAGS = $(GTK_CFLAGS) -fvisibility=hidden
libmio_a_SOURCES = mio.c
libmio_la_SOURCES = mio.c
EXTRA_DIST = \
mio.h \
......
......@@ -5,12 +5,13 @@ AM_CPPFLAGS = \
-DGEANY_PRIVATE \
-DG_LOG_DOMAIN=\"Tagmanager\"
AM_CFLAGS = \
$(GTK_CFLAGS)
$(GTK_CFLAGS) \
-fvisibility=hidden
EXTRA_DIST = \
makefile.win32
noinst_LIBRARIES = libtagmanager.a
noinst_LTLIBRARIES = libtagmanager.la
tagmanager_includedir = $(includedir)/geany/tagmanager
tagmanager_include_HEADERS = \
......@@ -20,7 +21,7 @@ tagmanager_include_HEADERS = \
tm_workspace.h
libtagmanager_a_SOURCES =\
libtagmanager_la_SOURCES =\
tm_tagmanager.h \
tm_parser.h \
tm_source_file.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment