Moved all static libraries to libtool libraries.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 20 Sep 2008 05:29:41 +0000 (13:29 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 20 Sep 2008 05:29:41 +0000 (13:29 +0800)
By default, this means that both pspp and psppire
will use two shared libraries.  If static libraries
are desired, then this can be achieved by configuring
with LDFLAGS=-static-libtool-libs

Closes patch #6633

15 files changed:
Makefile.am
lib/linreg/automake.mk
lib/misc/automake.mk
src/automake.mk
src/data/automake.mk
src/language/automake.mk
src/libpspp/automake.mk
src/math/automake.mk
src/math/ts/automake.mk
src/output/automake.mk
src/output/charts/automake.mk
src/ui/automake.mk
src/ui/gui/automake.mk
src/ui/terminal/automake.mk
tests/automake.mk

index ab32f9967861de2e0b5bc6c7836f185f9dc7f0ce..23305294af2176bedbc9b08ed4256e6f9aa5a308 100644 (file)
@@ -32,6 +32,7 @@ EXTRA_DIST = OChangeLog ONEWS config.rpath pspp-mode.el
 CLEANFILES = 
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4
 noinst_LIBRARIES=
+noinst_LTLIBRARIES=
 noinst_PROGRAMS=
 check_PROGRAMS=
 bin_PROGRAMS=
index 650646c6ee83a8b739bb4e1695ff24775e106fd5..30fd2e592d4c48fd674a27dbcadaa60f10275e97 100644 (file)
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-noinst_LIBRARIES += lib/linreg/liblinreg.a
+noinst_LTLIBRARIES += lib/linreg/liblinreg.la
 
-lib_linreg_liblinreg_a_SOURCES = \
+lib_linreg_liblinreg_la_SOURCES = \
        lib/linreg/sweep.c  lib/linreg/sweep.h 
 
 EXTRA_DIST += lib/linreg/OChangeLog
index 01bfd2b4d0dd01323a82b5036a1349fe14dd2b71..3b4f1a939f83e89ee778ca9c320ac158d8adfcab 100644 (file)
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-noinst_LIBRARIES += lib/misc/libmisc.a
+noinst_LTLIBRARIES += lib/misc/libmisc.la
 
-lib_misc_libmisc_a_SOURCES = \
+lib_misc_libmisc_la_SOURCES = \
        lib/misc/wx-mp-sr.c  lib/misc/wx-mp-sr.h 
 
 EXTRA_DIST += lib/misc/README
index 1ffbdf3e24ae70d8673cff1887b6d3fe2222c6ab..56f7590410f8d042761b9cdbf64949d219c4c669 100644 (file)
@@ -2,14 +2,42 @@
 
 # PSPP
 
-include $(top_srcdir)/src/math/automake.mk
 include $(top_srcdir)/src/libpspp/automake.mk
 include $(top_srcdir)/src/data/automake.mk
+
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib -DPKGDATADIR=\"$(pkgdatadir)\"
+
+
+lib_LTLIBRARIES = src/libpspp-core.la src/libpspp.la
+src_libpspp_core_la_SOURCES = 
+
+
+src_libpspp_core_la_LDFLAGS = -release @VERSION@
+
+src_libpspp_core_la_LIBADD = \
+       src/data/libdata.la \
+       src/libpspp/libpspp.la \
+       $(LIBXML2_LIBS) $(PG_LIBS) \
+       gl/libgl.la
+
+src_libpspp_la_SOURCES = 
+
+src_libpspp_la_LDFLAGS = -release @VERSION@
+
+src_libpspp_la_LIBADD = \
+       src/language/liblanguage.la \
+       src/math/libpspp-math.la \
+       src/output/liboutput.la \
+       gl/libgl.la
+
+
+include $(top_srcdir)/src/math/automake.mk
 include $(top_srcdir)/src/output/automake.mk
 include $(top_srcdir)/src/language/automake.mk
-
 include $(top_srcdir)/src/ui/automake.mk
 
-AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/lib -DPKGDATADIR=\"$(pkgdatadir)\"
+
 
 EXTRA_DIST += src/OChangeLog
index a6d18581483500dee9fb219cfa1e91bce800669a..5f25c1d25ce16ec3b321b715c0a6d5f938806ebd 100644 (file)
@@ -1,10 +1,11 @@
 
-noinst_LIBRARIES += src/data/libdata.a
+noinst_LTLIBRARIES += src/data/libdata.la
 
-src_data_libdata_a_CPPFLAGS = $(LIBXML2_CFLAGS) $(PG_CFLAGS) $(AM_CPPFLAGS) 
+src_data_libdata_la_CPPFLAGS = $(LIBXML2_CFLAGS) $(PG_CFLAGS) $(AM_CPPFLAGS) 
 
+src_data_libdata_la_LIBADD =   $(LIBXML2_LIBS) $(PG_LIBS)
 
-src_data_libdata_a_SOURCES = \
+src_data_libdata_la_SOURCES = \
        src/data/any-reader.c \
        src/data/any-reader.h \
        src/data/any-writer.c \
index d5ebb10e15fdefdfe85e3a2b71535ba8099cf16d..a62351630006b508238ddb28b8bea2fb77c878cb 100644 (file)
@@ -10,9 +10,14 @@ include $(top_srcdir)/src/language/stats/automake.mk
 include $(top_srcdir)/src/language/data-io/automake.mk
 include $(top_srcdir)/src/language/expressions/automake.mk
 
-noinst_LIBRARIES += src/language/liblanguage.a
+noinst_LTLIBRARIES +=  src/language/liblanguage.la
 
-src_language_liblanguage_a_SOURCES = \
+
+src_language_liblanguage_la_LIBADD = \
+       lib/misc/libmisc.la \
+       src/output/charts/libcharts.la
+
+src_language_liblanguage_la_SOURCES = \
        src/language/syntax-file.c \
        src/language/syntax-file.h \
        src/language/syntax-string-source.c \
@@ -33,8 +38,7 @@ src_language_liblanguage_a_SOURCES = \
        $(language_expressions_sources)
 
 
-
-nodist_src_language_liblanguage_a_SOURCES = \
+nodist_src_language_liblanguage_la_SOURCES = \
        $(src_language_data_io_built_sources) \
        $(src_language_utilities_built_sources) \
        $(src_language_stats_built_sources)  \
index a0d7879f524145936d9bacab94c7a365a4baef77..aaaa45b40459d09cd121e05ecd170e5f15d0bcd0 100644 (file)
@@ -1,9 +1,9 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
 
-noinst_LIBRARIES += src/libpspp/libpspp.a
+noinst_LTLIBRARIES += src/libpspp/libpspp.la
 
-src_libpspp_libpspp_a_SOURCES = \
+src_libpspp_libpspp_la_SOURCES = \
        src/libpspp/abt.c \
        src/libpspp/abt.h \
        src/libpspp/array.c \
@@ -67,9 +67,9 @@ src_libpspp_libpspp_a_SOURCES = \
 
 DISTCLEANFILES+=src/libpspp/version.c
 
-src_libpspp_libpspp_a_CPPFLAGS = -I $(top_srcdir)/src/libpspp $(AM_CPPFLAGS)
+src_libpspp_libpspp_la_CPPFLAGS = -I $(top_srcdir)/src/libpspp $(AM_CPPFLAGS)
 
-nodist_src_libpspp_libpspp_a_SOURCES = src/libpspp/version.c
+nodist_src_libpspp_libpspp_la_SOURCES = src/libpspp/version.c
 
 src/libpspp/version.c: $(top_srcdir)/AUTHORS
        @$(MKDIR_P) src/libpspp
index 5b67c1cfa3f98298dc3159e8b37165d457391bcd..e463088779f385fa0b58ccc7edc6ba720c1bddc8 100644 (file)
@@ -2,9 +2,12 @@
 
 include $(top_srcdir)/src/math/ts/automake.mk
 
-noinst_LIBRARIES += src/math/libpspp_math.a
+noinst_LTLIBRARIES += src/math/libpspp-math.la
 
-src_math_libpspp_math_a_SOURCES = \
+src_math_libpspp_math_la_LIBADD = \
+       lib/linreg/liblinreg.la
+
+src_math_libpspp_math_la_SOURCES = \
        src/math/chart-geometry.c \
        src/math/chart-geometry.h \
        src/math/box-whisker.c src/math/box-whisker.h \
index 2ca1f959fa22fb19d2d50453081e05ce26b282ee..eecc53a81f68ed388b68cd7459307f1861cbd84f 100644 (file)
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-noinst_LIBRARIES += src/math/ts/libpspp_ts.a
+noinst_LTLIBRARIES += src/math/ts/libpspp_ts.la
 
-src_math_ts_libpspp_ts_a_SOURCES = \
+src_math_ts_libpspp_ts_la_SOURCES = \
        src/math/ts/innovations.c \
        src/math/ts/innovations.h
 
index d30acf63e50f2b870c05c019fb136e72428a9a1e..ec92c559e044723180977db31ca43708c7f637bd 100644 (file)
@@ -3,7 +3,7 @@
 
 include $(top_srcdir)/src/output/charts/automake.mk
 
-noinst_LIBRARIES += src/output/liboutput.
+noinst_LTLIBRARIES += src/output/liboutput.l
 
 output_sources = \
        src/output/afm.c \
@@ -23,11 +23,11 @@ output_sources = \
 
 
 if WITHCHARTS
-src_output_liboutput_a_SOURCES = $(output_sources) src/output/chart.c
+src_output_liboutput_la_SOURCES = $(output_sources) src/output/chart.c
 
 EXTRA_DIST += src/output/dummy-chart.c
 else
-src_output_liboutput_a_SOURCES = $(output_sources) src/output/dummy-chart.c
+src_output_liboutput_la_SOURCES = $(output_sources) src/output/dummy-chart.c
 
 EXTRA_DIST += src/output/chart.c
 endif
index a480de6da9bc384d040a9bd4dfe8b3ab8ea7adf4..ab0ff51047a4ffeb608770c3b088df8843077204 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-noinst_LIBRARIES += src/output/charts/libcharts.a
+noinst_LTLIBRARIES += src/output/charts/libcharts.la
 
 chart_sources = \
        src/output/charts/barchart.c \
@@ -17,12 +17,12 @@ chart_sources = \
        src/output/charts/plot-hist.h
 
 if WITHCHARTS
-src_output_charts_libcharts_a_SOURCES = \
+src_output_charts_libcharts_la_SOURCES = \
        $(chart_sources)
 
 EXTRA_DIST += src/output/charts/dummy-chart.c
 else
-src_output_charts_libcharts_a_SOURCES =  \
+src_output_charts_libcharts_la_SOURCES =  \
        src/output/charts/dummy-chart.c
 
 EXTRA_DIST += $(chart_sources)
index 044c293c5424509d760667979b7ad2fef357d5a0..f1dde68a56a4febb2fb0f7f82a1d0832c9f4f018 100644 (file)
@@ -6,9 +6,9 @@ include $(top_srcdir)/src/ui/gui/automake.mk
 endif
 
 
-noinst_LIBRARIES += src/ui/libuicommon.a
+noinst_LTLIBRARIES += src/ui/libuicommon.la
 
-src_ui_libuicommon_a_SOURCES = \
+src_ui_libuicommon_la_SOURCES = \
        src/ui/debugger.c \
        src/ui/debugger.h \
        src/ui/syntax-gen.c \
index c6aa455d4112d6140b65e4e5ddd7bf7fc1a196ee..f77f88c7935134c94beea5f30abb14a9f6dc6471 100644 (file)
@@ -53,20 +53,12 @@ src_ui_gui_psppire_LDADD = \
        -dlopen src/ui/gui/libpsppire.la \
        src/ui/gui/libpsppwidgets.la \
        lib/gtksheet/libgtksheet.a \
-       src/language/liblanguage.a \
-       src/ui/libuicommon.a \
-       src/output/charts/libcharts.a \
-       src/output/liboutput.a \
-       src/math/libpspp_math.a  \
-       lib/linreg/liblinreg.a  \
-       lib/misc/libmisc.a      \
-       src/data/libdata.a \
-       src/libpspp/libpspp.a \
+       src/ui/libuicommon.la \
+       src/libpspp.la \
+       src/libpspp-core.la \
        $(GTK_LIBS) \
        $(GLADE_LIBS) \
-       $(PG_LIBS) \
-       gl/libgl.la \
-       @LIBINTL@ @LIBREADLINE@
+       @LIBINTL@
 
 src_ui_gui_psppiredir = $(pkgdatadir)
 
index 0e3d295a7155d234a5ca79ab5652ecd3da3ebe00..a93e4b6cb10725ffafd33cacbc1879cf7243d13a 100644 (file)
@@ -1,8 +1,8 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
-noinst_LIBRARIES += src/ui/terminal/libui.a
+noinst_LTLIBRARIES += src/ui/terminal/libui.la
 
-src_ui_terminal_libui_a_SOURCES = \
+src_ui_terminal_libui_la_SOURCES = \
        src/ui/terminal/command-line.c \
        src/ui/terminal/command-line.h \
        src/ui/terminal/read-line.c \
@@ -17,30 +17,17 @@ src_ui_terminal_libui_a_CFLAGS = -DINSTALLDIR=\"$(bindir)\" $(NCURSES_CFLAGS)
 
 bin_PROGRAMS += src/ui/terminal/pspp
 
-
 src_ui_terminal_pspp_SOURCES =
 
 src_ui_terminal_pspp_LDADD = \
-       src/ui/terminal/libui.a \
-       src/language/liblanguage.a \
-       src/output/charts/libcharts.a \
-       src/output/liboutput.a \
-       src/math/libpspp_math.a  \
-       src/ui/libuicommon.a \
-       lib/linreg/liblinreg.a  \
-       lib/misc/libmisc.a      \
-       src/data/libdata.a \
-       src/libpspp/libpspp.a \
-       $(LIBXML2_LIBS) \
-       $(PG_LIBS) \
+       src/ui/terminal/libui.la \
+       src/libpspp.la \
+       src/libpspp-core.la \
        $(NCURSES_LIBS) \
        $(LIBICONV) \
-       gl/libgl.la \
        @LIBINTL@ @LIBREADLINE@
 
 
-
-
 src_ui_terminal_pspp_LDFLAGS = $(PG_LDFLAGS)
 
 if RELOCATABLE_VIA_LD
index 00afa19757342a935c51111bcd0d1e510e86abde..e66da432abf254225cb655f9ab8a7af3d73a68d9 100644 (file)
@@ -189,6 +189,7 @@ tests_libpspp_ll_test_SOURCES = \
        src/libpspp/ll.h \
        tests/libpspp/ll-test.c
 tests_libpspp_ll_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
 
 tests_libpspp_llx_test_SOURCES = \
        src/libpspp/ll.c \
@@ -197,6 +198,7 @@ tests_libpspp_llx_test_SOURCES = \
        src/libpspp/llx.h \
        tests/libpspp/llx-test.c
 tests_libpspp_llx_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
 
 tests_libpspp_heap_test_SOURCES = \
        src/libpspp/heap.c \
@@ -243,7 +245,7 @@ tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
 
 tests_libpspp_str_test_SOURCES = \
        tests/libpspp/str-test.c
-tests_libpspp_str_test_LDADD = src/libpspp/libpspp.a gl/libgl.la @LIBINTL@
+tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la @LIBINTL@
 
 tests_libpspp_tower_test_SOURCES = \
        src/libpspp/abt.c \
@@ -273,6 +275,7 @@ tests_dissect_sysfile_SOURCES = \
        src/libpspp/float-format.c \
        tests/dissect-sysfile.c
 tests_dissect_sysfile_LDADD = gl/libgl.la @LIBINTL@
+tests_dissect_sysfile_CFLAGS = $(AM_CFLAGS)
 
 EXTRA_DIST += \
        $(dist_TESTS) \