From 5915fbdca0307fb20f05555885283b3dc3fbefa0 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 20 Sep 2008 13:29:41 +0800 Subject: [PATCH] Moved all static libraries to libtool libraries. 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 --- Makefile.am | 1 + lib/linreg/automake.mk | 4 ++-- lib/misc/automake.mk | 4 ++-- src/automake.mk | 34 +++++++++++++++++++++++++++++++--- src/data/automake.mk | 7 ++++--- src/language/automake.mk | 12 ++++++++---- src/libpspp/automake.mk | 8 ++++---- src/math/automake.mk | 7 +++++-- src/math/ts/automake.mk | 4 ++-- src/output/automake.mk | 6 +++--- src/output/charts/automake.mk | 6 +++--- src/ui/automake.mk | 4 ++-- src/ui/gui/automake.mk | 16 ++++------------ src/ui/terminal/automake.mk | 23 +++++------------------ tests/automake.mk | 5 ++++- 15 files changed, 80 insertions(+), 61 deletions(-) diff --git a/Makefile.am b/Makefile.am index ab32f996..23305294 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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= diff --git a/lib/linreg/automake.mk b/lib/linreg/automake.mk index 650646c6..30fd2e59 100644 --- a/lib/linreg/automake.mk +++ b/lib/linreg/automake.mk @@ -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 diff --git a/lib/misc/automake.mk b/lib/misc/automake.mk index 01bfd2b4..3b4f1a93 100644 --- a/lib/misc/automake.mk +++ b/lib/misc/automake.mk @@ -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 diff --git a/src/automake.mk b/src/automake.mk index 1ffbdf3e..56f75904 100644 --- a/src/automake.mk +++ b/src/automake.mk @@ -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 diff --git a/src/data/automake.mk b/src/data/automake.mk index a6d18581..5f25c1d2 100644 --- a/src/data/automake.mk +++ b/src/data/automake.mk @@ -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 \ diff --git a/src/language/automake.mk b/src/language/automake.mk index d5ebb10e..a6235163 100644 --- a/src/language/automake.mk +++ b/src/language/automake.mk @@ -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) \ diff --git a/src/libpspp/automake.mk b/src/libpspp/automake.mk index a0d7879f..aaaa45b4 100644 --- a/src/libpspp/automake.mk +++ b/src/libpspp/automake.mk @@ -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 diff --git a/src/math/automake.mk b/src/math/automake.mk index 5b67c1cf..e4630887 100644 --- a/src/math/automake.mk +++ b/src/math/automake.mk @@ -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 \ diff --git a/src/math/ts/automake.mk b/src/math/ts/automake.mk index 2ca1f959..eecc53a8 100644 --- a/src/math/ts/automake.mk +++ b/src/math/ts/automake.mk @@ -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 diff --git a/src/output/automake.mk b/src/output/automake.mk index d30acf63..ec92c559 100644 --- a/src/output/automake.mk +++ b/src/output/automake.mk @@ -3,7 +3,7 @@ include $(top_srcdir)/src/output/charts/automake.mk -noinst_LIBRARIES += src/output/liboutput.a +noinst_LTLIBRARIES += src/output/liboutput.la 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 diff --git a/src/output/charts/automake.mk b/src/output/charts/automake.mk index a480de6d..ab0ff510 100644 --- a/src/output/charts/automake.mk +++ b/src/output/charts/automake.mk @@ -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) diff --git a/src/ui/automake.mk b/src/ui/automake.mk index 044c293c..f1dde68a 100644 --- a/src/ui/automake.mk +++ b/src/ui/automake.mk @@ -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 \ diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index c6aa455d..f77f88c7 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -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) diff --git a/src/ui/terminal/automake.mk b/src/ui/terminal/automake.mk index 0e3d295a..a93e4b6c 100644 --- a/src/ui/terminal/automake.mk +++ b/src/ui/terminal/automake.mk @@ -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 diff --git a/tests/automake.mk b/tests/automake.mk index 00afa197..e66da432 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -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) \ -- 2.30.2