enable building of shared libraries. reduces final linktime. also combine boost stuff into a single library

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-08-10 22:33:54 +00:00
parent 5ae54ddafb
commit 67e61a3956
29 changed files with 100 additions and 198 deletions

View File

@ -1,5 +1,43 @@
include $(top_srcdir)/config/common.am
SUBDIRS = libs
pkglib_LTLIBRARIES = liblyxboost.la
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
AM_CPPFLAGS += $(PCH_FLAGS)
AM_CPPFLAGS += -DBOOST_USER_CONFIG="<config.h>"
AM_CPPFLAGS += $(BOOST_INCLUDES)
liblyxboost_la_SOURCES = \
\
libs/iostreams/src/file_descriptor.cpp \
libs/iostreams/src/mapped_file.cpp \
libs/iostreams/src/zlib.cpp \
\
libs/filesystem/src/exception.cpp \
libs/filesystem/src/operations.cpp \
libs/filesystem/src/path.cpp \
libs/filesystem/src/portability.cpp \
\
libs/regex/src/cpp_regex_traits.cpp \
libs/regex/src/c_regex_traits.cpp \
libs/regex/src/cregex.cpp \
libs/regex/src/fileiter.cpp \
libs/regex/src/instances.cpp \
libs/regex/src/regex.cpp \
libs/regex/src/regex_raw_buffer.cpp \
libs/regex/src/regex_traits_defaults.cpp \
libs/regex/src/w32_regex_traits.cpp \
libs/regex/src/posix_api.cpp \
libs/regex/src/wide_posix_api.cpp \
libs/regex/src/regex_debug.cpp \
libs/regex/src/winstances.cpp \
\
libs/signals/src/connection.cpp \
libs/signals/src/named_slot_map.cpp \
libs/signals/src/signal_base.cpp \
libs/signals/src/slot.cpp \
libs/signals/src/trackable.cpp
EXTRA_DIST = boost

View File

@ -1,3 +0,0 @@
include $(top_srcdir)/config/common.am
SUBDIRS = filesystem iostreams regex signals

View File

@ -1,3 +0,0 @@
include $(top_srcdir)/config/common.am
SUBDIRS = src

View File

@ -1,18 +0,0 @@
include $(top_srcdir)/config/common.am
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libboost_filesystem.la
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
libboost_filesystem_la_SOURCES = \
exception.cpp \
operations.cpp \
path.cpp \
portability.cpp

View File

@ -1,19 +0,0 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/filesystem/config.hpp>
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/scoped_array.hpp>
#include <boost/throw_exception.hpp>
#include <cassert>
#include <cerrno>
#include <cstdio> // for remove, rename
#include <cstring>
#include <cstring> // SGI MIPSpro compilers need this
#include <cstring> // SGI MIPSpro compilers need this
#include <string>
#include <sys/stat.h> // last_write_time() uses stat()
#include <vector>

View File

@ -1,3 +0,0 @@
include $(top_srcdir)/config/common.am
SUBDIRS = src

View File

@ -1,17 +0,0 @@
include $(top_srcdir)/config/common.am
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libboost_iostreams.la
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
libboost_iostreams_la_SOURCES = \
file_descriptor.cpp \
mapped_file.cpp \
zlib.cpp

View File

@ -1,3 +0,0 @@
include $(top_srcdir)/config/common.am
SUBDIRS = src

View File

@ -1,27 +0,0 @@
include $(top_srcdir)/config/common.am
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libboost_regex.la
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
libboost_regex_la_SOURCES = \
cpp_regex_traits.cpp \
c_regex_traits.cpp \
cregex.cpp \
fileiter.cpp \
instances.cpp \
regex.cpp \
regex_raw_buffer.cpp \
regex_traits_defaults.cpp \
w32_regex_traits.cpp \
posix_api.cpp \
wide_posix_api.cpp \
regex_debug.cpp \
winstances.cpp

View File

@ -1,14 +0,0 @@
#include <cctype>
#include <climits>
#include <clocale>
#include <cstdio>
#include <cstring>
#include <cwchar>
#include <iostream>
#include <list>
#include <locale>
#include <map>
#include <new>
#include <ostream>
#include <set>
#include <stdexcept>

View File

@ -1,3 +0,0 @@
include $(top_srcdir)/config/common.am
SUBDIRS = src

View File

@ -1,19 +0,0 @@
include $(top_srcdir)/config/common.am
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libboost_signals.la
AM_CPPFLAGS += \
$(PCH_FLAGS) \
-DBOOST_USER_CONFIG="<config.h>" \
$(BOOST_INCLUDES)
libboost_signals_la_SOURCES = \
connection.cpp \
named_slot_map.cpp \
signal_base.cpp \
slot.cpp \
trackable.cpp

View File

@ -1,7 +0,0 @@
#include <boost/signals/connection.hpp>
#include <boost/signals/detail/signal_base.hpp>
#include <boost/signals/slot.hpp>
#include <boost/signals/trackable.hpp>
#include <algorithm>
#include <cassert>

View File

@ -30,10 +30,7 @@ SUFFIXES = .gch
if USE_INCLUDED_BOOST
BOOST_INCLUDES = -I$(top_srcdir)/boost
BOOST_FILESYSTEM = $(top_builddir)/boost/libs/filesystem/src/libboost_filesystem.la
BOOST_REGEX = $(top_builddir)/boost/libs/regex/src/libboost_regex.la
BOOST_SIGNALS = $(top_builddir)/boost/libs/signals/src/libboost_signals.la
BOOST_IOSTREAMS = $(top_builddir)/boost/libs/iostreams/src/libboost_iostreams.la
BOOST_LIBS = $(top_builddir)/boost/liblyxboost.la
else
BOOST_INCLUDES =
BOOST_FILESYSTEM = -lboost_filesystem

View File

@ -153,7 +153,8 @@ dnl see http://permalink.gmane.org/gmane.comp.gnu.libtool.general/6699
dnl Note that this will reportedly not be needed with libtool 2.0
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AC_DISABLE_SHARED
#AC_DISABLE_SHARED
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
#AM_PROG_LIBTOOL
LYX_PROG_LIBTOOL
@ -394,15 +395,6 @@ char * strerror(int n);
### Finish the work.
AC_CONFIG_FILES([Makefile
boost/Makefile \
boost/libs/Makefile \
boost/libs/filesystem/Makefile \
boost/libs/filesystem/src/Makefile \
boost/libs/iostreams/Makefile \
boost/libs/iostreams/src/Makefile \
boost/libs/regex/Makefile \
boost/libs/regex/src/Makefile \
boost/libs/signals/Makefile \
boost/libs/signals/src/Makefile \
config/Makefile \
development/Makefile \
development/MacOSX/Makefile \

View File

@ -1745,7 +1745,11 @@ if build_qt4:
#
# moc qt4_moc_files, the moced files are included in the original files
#
qt4_moced_files = [frontend_env.Moc4(x.replace('.cpp', '_moc.cpp'), x.replace('.cpp', '.h')) for x in qt4_moc_files]
# qt4_moced_files = [frontend_env.Moc4(x.replace('.cpp', '_moc.cpp'), \
# x.replace('.cpp', '.h')) for x in qt4_moc_files]
qt4_moced_files = [frontend_env.Moc4("moc_" + x, x.replace('.cpp', '.h')) for x in qt4_moc_files]
qt4 = frontend_env.StaticLibrary(
target = '$LOCALLIBPATH/qt4',

View File

@ -49,6 +49,7 @@ src/frontends/controllers/frontend_helpers.cpp
src/frontends/qt4/BulletsModule.cpp
src/frontends/qt4/Dialogs.cpp
src/frontends/qt4/FileDialog.cpp
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/IconPalette.cpp

View File

@ -18,23 +18,21 @@ EXTRA_DIST = config.h.in stamp-h.in version.cpp.in \
paper.h \
pch.h
LYX_PRE_LIBS = mathed/libmathed.la insets/libinsets.la \
frontends/libfrontends.la
LYX_PRE_LIBS = mathed/liblyxmathed.la insets/liblyxinsets.la \
frontends/liblyxfrontends.la
LYX_POST_LIBS = frontends/controllers/libcontrollers.la \
graphics/libgraphics.la \
support/libsupport.la
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_SIGNALS) $(BOOST_FILESYSTEM) $(BOOST_IOSTREAMS)
LYX_POST_LIBS = frontends/controllers/liblyxcontrollers.la \
graphics/liblyxgraphics.la \
support/liblyxsupport.la
OTHERLIBS = $(BOOST_LIBS) $(INTLLIBS) $(AIKSAURUS_LIBS) @LIBS@ $(SOCKET_LIBS)
bin_PROGRAMS = lyx
pkglib_LTLIBRARIES = liblyxcore.la
noinst_PROGRAMS = $(FRONTENDS_PROGS)
EXTRA_PROGRAMS = lyx-qt4
lyx_qt4_LDADD = $(lyx_OBJECTS) $(LYX_PRE_LIBS) \
frontends/qt4/libqt4.la $(LYX_POST_LIBS) $(OTHERLIBS)
lyx_qt4_LDADD = liblyxcore.la $(LYX_PRE_LIBS) \
frontends/qt4/liblyxqt4.la $(LYX_POST_LIBS) $(OTHERLIBS)
lyx_qt4_SOURCES = main.cpp
lyx$(EXEEXT): $(FRONTENDS_PROGS)
@ -58,8 +56,7 @@ ISPELL = ISpell.cpp ISpell.h
endif
lyx_SOURCES = \
liblyxcore_la_SOURCES = \
$(ASPELL) $(PSPELL) $(ISPELL) SpellBase.cpp \
Author.cpp \
Author.h \

View File

@ -12,20 +12,25 @@ bin_PROGRAMS = lyxclient
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM)
lyxclient_LDADD = \
$(top_builddir)/src/support/libsupport.la \
$(top_builddir)/src/liblyxcore.la \
$(top_builddir)/src/insets/liblyxinsets.la \
$(top_builddir)/src/mathed/liblyxmathed.la \
$(top_builddir)/src/graphics/liblyxgraphics.la \
$(top_builddir)/src/frontends/liblyxfrontends.la \
$(top_builddir)/src/frontends/controllers/liblyxcontrollers.la \
$(top_builddir)/src/frontends/qt4/liblyxqt4.la \
$(top_builddir)/src/support/liblyxsupport.la \
$(BOOST_LIBS) $(INTLLIBS) @LIBS@ $(SOCKET_LIBS)
lyxclient_SOURCES = \
boost.cpp \
client.cpp \
debug.cpp \
debug.h \
gettext.cpp \
Messages.cpp \
Messages.h
boost.cpp \
client.cpp \
debug.cpp \
debug.h \
gettext.cpp \
Messages.cpp \
Messages.h
lyxclient.1:
cp -p $(srcdir)/lyxclient.man lyxclient.1

View File

@ -8,11 +8,11 @@ EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libfrontends.la
pkglib_LTLIBRARIES = liblyxfrontends.la
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libfrontends_la_SOURCES = \
liblyxfrontends_la_SOURCES = \
alert.cpp \
alert.h \
Alert_pimpl.h \

View File

@ -6,11 +6,11 @@ EXTRA_DIST = pch.h BCView.tmpl
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libcontrollers.la
pkglib_LTLIBRARIES = liblyxcontrollers.la
AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES)
libcontrollers_la_SOURCES= \
liblyxcontrollers_la_SOURCES= \
Dialog.cpp \
Dialog.h \
Kernel.cpp \

View File

@ -7,7 +7,7 @@ EXTRA_DIST = pch.h Makefile.dialogs
DISTCLEANFILES += *_moc.cpp
libqt4_la_DEPENDENCIES = $(MOCEDFILES)
liblyxqt4_la_DEPENDENCIES = $(MOCEDFILES)
MOCEDFILES = $(MOCFILES:.cpp=_moc.cpp)
@ -16,10 +16,10 @@ MOCEDFILES = $(MOCFILES:.cpp=_moc.cpp)
BUILT_SOURCES = $(PCH_FILE) $(MOCEDFILES)
noinst_LTLIBRARIES = libqt4.la
noinst_LTLIBRARIES = liblyxqt4.la
libqt4_la_LDFLAGS = $(QT4_LDFLAGS)
libqt4_la_LIBADD = $(QT4_LIB)
liblyxqt4_la_LDFLAGS = $(QT4_LDFLAGS)
liblyxqt4_la_LIBADD = $(QT4_LIB)
AM_CPPFLAGS += \
$(QT4_CPPFLAGS) \
$(PCH_FLAGS) \
@ -29,7 +29,7 @@ AM_CPPFLAGS += \
$(QT4_INCLUDES) $(BOOST_INCLUDES) \
-I$(top_srcdir)/src/frontends/controllers
libqt4_la_SOURCES = \
liblyxqt4_la_SOURCES = \
alert_pimpl.cpp \
ColorCache.h ColorCache.cpp \
DockView.h \

View File

@ -4,11 +4,11 @@ EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libgraphics.la
pkglib_LTLIBRARIES = liblyxgraphics.la
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libgraphics_la_SOURCES = \
liblyxgraphics_la_SOURCES = \
GraphicsCache.h \
GraphicsCache.cpp \
GraphicsCacheItem.h \

View File

@ -1,6 +1,6 @@
include $(top_srcdir)/config/common.am
noinst_LTLIBRARIES = libinsets.la
pkglib_LTLIBRARIES = liblyxinsets.la
EXTRA_DIST = \
pch.h \
@ -11,7 +11,7 @@ BUILT_SOURCES = $(PCH_FILE)
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libinsets_la_SOURCES = \
liblyxinsets_la_SOURCES = \
MailInset.cpp \
MailInset.h \
ExternalSupport.cpp \

View File

@ -4,11 +4,11 @@ EXTRA_DIST = pch.h InsetFormulaMacro.cpp
BUILT_SOURCES = $(PCH_FILE)
noinst_LTLIBRARIES = libmathed.la
pkglib_LTLIBRARIES = liblyxmathed.la
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
libmathed_la_SOURCES = \
liblyxmathed_la_SOURCES = \
InsetMathAMSArray.cpp \
InsetMathAMSArray.h \
InsetMathArray.cpp \

View File

@ -24,7 +24,6 @@ following hack as starting point to write some macros:
\else
\def\b{}\def\e{}
\fi
...
\[\begin{array}{ccc}

View File

@ -7,17 +7,17 @@ CLEANFILES += $(BUILT_SOURCES)
EXTRA_DIST = Package.cpp.in pch.h \
os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
noinst_LTLIBRARIES = libsupport.la
pkglib_LTLIBRARIES = liblyxsupport.la
libsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB)
libsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
BUILT_SOURCES = $(PCH_FILE) package.C
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
libsupport_la_SOURCES = \
liblyxsupport_la_SOURCES = \
FileMonitor.h \
FileMonitor.cpp \
RandomAccessList.h \

View File

@ -18,8 +18,6 @@ bin_PROGRAMS = tex2lyx
AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_FILESYSTEM) $(BOOST_IOSTREAMS)
LINKED_FILES = \
FloatList.cpp \
Floating.cpp \
@ -52,7 +50,14 @@ tex2lyx_SOURCES = \
text.cpp
tex2lyx_LDADD = \
$(top_builddir)/src/support/libsupport.la \
$(top_builddir)/src/support/liblyxsupport.la \
$(top_builddir)/src/liblyxcore.la \
$(top_builddir)/src/insets/liblyxinsets.la \
$(top_builddir)/src/mathed/liblyxmathed.la \
$(top_builddir)/src/graphics/liblyxgraphics.la \
$(top_builddir)/src/frontends/liblyxfrontends.la \
$(top_builddir)/src/frontends/controllers/liblyxcontrollers.la \
$(top_builddir)/src/frontends/qt4/liblyxqt4.la \
$(BOOST_LIBS) $(LIBICONV) @LIBS@
$(LINKED_FILES) :